24 lines
651 B
Makefile
24 lines
651 B
Makefile
INPUT_FILES := $(shell find web -name *.html)
|
|
DEFAULT_DOMAIN = numerus
|
|
POT_FILE = po/$(DEFAULT_DOMAIN).pot
|
|
LINGUAS = ca es
|
|
MO_FILES = $(patsubst %,locales/%/LC_MESSAGES/$(DEFAULT_DOMAIN).mo,$(LINGUAS))
|
|
|
|
locales: $(MO_FILES)
|
|
|
|
locales/%/LC_MESSAGES/numerus.mo: po/%.po
|
|
mkdir -p $(@D)
|
|
msgfmt -o $@ $<
|
|
|
|
po/%.po: $(POT_FILE)
|
|
msgmerge --no-wrap --update --backup=off $@ $<
|
|
|
|
$(POT_FILE): $(INPUT_FILES)
|
|
xgettext --no-wrap --language=Scheme --from-code=UTF-8 --output=$@ --keyword=pgettext:1,2c --package-name=numerus --msgid-bugs-address=jordi@tandem.blog $^
|
|
|
|
test-deploy:
|
|
sqitch deploy --db-name $(PGDATABASE)
|
|
pg_prove test/*
|
|
|
|
.PHONY: locales test-db
|