summaryrefslogtreecommitdiffhomepage
path: root/GNUmakefile
diff options
context:
space:
mode:
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile29
1 files changed, 11 insertions, 18 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 3c48127..d42cc0b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,14 +1,14 @@
cssfiles := $(shell find static -name '*.css' -not -name '*.min.css')
cssfiles := $(cssfiles:.css=.min.css)
gofiles := $(shell find main.go src -name '*.go')
+sqlfiles := $(shell find src/dbx/sql -name '*.sql')
templates := $(shell find src/templates -name '*.tmpl')
exttmpl := $(wildcard cmd/exttmpl/*.go)
-mfmt := $(wildcard cmd/mfmt/*.go)
-all: euro-cash.eu exttmpl mfmt
+all: euro-cash.eu exttmpl
-euro-cash.eu: $(cssfiles) $(templates) $(gofiles)
+euro-cash.eu: $(cssfiles) $(templates) $(gofiles) $(sqlfiles)
go build
all-i18n: exttmpl
@@ -19,27 +19,20 @@ all-i18n: exttmpl
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 {} +
+ if command -v lightningcss >/dev/null; \
+ then \
+ lightningcss -m $< -o $@; \
+ else \
+ cp $< $@; \
+ fi
clean:
find . -type f \( \
-name euro-cash.eu \
-or -name exttmpl \
- -or -name mfmt \
-or -name '*.min.css' \
-or -name '*.tar.gz' \
\) -delete
+
+.PHONY: all-i18n clean release \ No newline at end of file