You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
512 B
Makefile
25 lines
512 B
Makefile
GOFILES = $(wildcard */*.go)
|
|
TEMPLATES = $(wildcard templates/*.gohtml)
|
|
TRANSLATIONS = $(wildcard active.*.toml)
|
|
|
|
all: demo-app
|
|
|
|
go.sum: go.mod
|
|
go mod tidy
|
|
|
|
translations: $(TRANSLATIONS) $(GOFILES)
|
|
goi18n extract .
|
|
goi18n merge active.*.toml
|
|
if translate.*.toml 2>/dev/null; then \
|
|
echo "missing translations"; \
|
|
goi18n merge active.*.toml translate.*.toml; \
|
|
fi
|
|
|
|
demo-app: go.sum $(GOFILES) $(TEMPLATES) translations
|
|
go build -o $@ ./cmd/app.go
|
|
|
|
clean:
|
|
rm -f demo-app
|
|
|
|
.PHONY: all translations clean
|