From 42d0c8cc527dd0732b8a752116d676fd1863bb15 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 21 Sep 2024 10:43:25 +0200 Subject: Rename Makefile to GNUmakefile --- GNUmakefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ Makefile | 44 -------------------------------------------- 2 files changed, 44 insertions(+), 44 deletions(-) create mode 100644 GNUmakefile delete mode 100644 Makefile diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..1dccc8e --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,44 @@ +cssfiles := $(shell find static -name '*.css' -not -name '*.min.css') +cssfiles := $(cssfiles:.css=.min.css) +gofiles := $(shell find main.go src -name '*.go') +templates := $(shell find src/templates -name '*.tmpl') + +exttmpl := $(wildcard cmd/exttmpl/*.go) +mfmt := $(wildcard cmd/mfmt/*.go) + +all: euro-cash.eu exttmpl mfmt + +euro-cash.eu: $(cssfiles) $(templates) $(gofiles) + go build + +all-i18n: exttmpl + go generate ./src + find . -name out.gotext.json | mcp -b sed s/out/messages/ + go build + +exttmpl: $(exttmpl) + go build ./cmd/exttmpl + +mfmt: $(mfmt) + go build ./cmd/mfmt + +%.min.css: %.css + lightningcss -m $< -o $@ + +watch: + ls euro-cash.eu | entr -r ./euro-cash.eu -no-email -port $${PORT:-8080} + +release: all-i18n + [ -n "$$GOOS" -a -n "$$GOARCH" ] + find data static -type f \ + \( -not -name '*.css' -or -name '*.min.css' \) \ + -exec tar -cf euro-cash.eu-$$GOOS-$$GOARCH.tar.gz euro-cash.eu {} + + +clean: + find . -type f \( \ + -name euro-cash.eu \ + -or -name exttmpl \ + -or -name mfmt \ + -or -name '*.min.css' \ + -or -name '*.tar.gz' \ + \) -delete diff --git a/Makefile b/Makefile deleted file mode 100644 index 1dccc8e..0000000 --- a/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -cssfiles := $(shell find static -name '*.css' -not -name '*.min.css') -cssfiles := $(cssfiles:.css=.min.css) -gofiles := $(shell find main.go src -name '*.go') -templates := $(shell find src/templates -name '*.tmpl') - -exttmpl := $(wildcard cmd/exttmpl/*.go) -mfmt := $(wildcard cmd/mfmt/*.go) - -all: euro-cash.eu exttmpl mfmt - -euro-cash.eu: $(cssfiles) $(templates) $(gofiles) - go build - -all-i18n: exttmpl - go generate ./src - find . -name out.gotext.json | mcp -b sed s/out/messages/ - go build - -exttmpl: $(exttmpl) - go build ./cmd/exttmpl - -mfmt: $(mfmt) - go build ./cmd/mfmt - -%.min.css: %.css - lightningcss -m $< -o $@ - -watch: - ls euro-cash.eu | entr -r ./euro-cash.eu -no-email -port $${PORT:-8080} - -release: all-i18n - [ -n "$$GOOS" -a -n "$$GOARCH" ] - find data static -type f \ - \( -not -name '*.css' -or -name '*.min.css' \) \ - -exec tar -cf euro-cash.eu-$$GOOS-$$GOARCH.tar.gz euro-cash.eu {} + - -clean: - find . -type f \( \ - -name euro-cash.eu \ - -or -name exttmpl \ - -or -name mfmt \ - -or -name '*.min.css' \ - -or -name '*.tar.gz' \ - \) -delete -- cgit v1.2.3