warzone2100/po/Makefile.raw

33 lines
778 B
Makefile

MAKERULES=../makerules
include $(MAKERULES)/configure.mk
.PHONY: all clean update-po po-files mo-files
all:
ifdef USE_GETTEXT
all: po-files mo-files
endif
PO_FILES=nb.po de.po da.po nl.po la.po
MO_FILES=$(patsubst %.po,%.gmo, $(PO_FILES))
po-files: $(PO_FILES)
mo-files: $(MO_FILES)
update-po: clean all
$(PACKAGE).pot: POTFILES.in
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=.. --add-comments=TRANSLATORS: --keyword=_ --keyword=N_ --keyword=P_:1c,2 --keyword=NP_:1c,2 --files-from=$< --copyright-holder="Warzone Resurrection Project" --msgid-bugs-address="warzone-dev@gna.org"
mv $(PACKAGE).po $@
%.po: $(PACKAGE).pot
$(MSGMERGE) $@ $(PACKAGE).pot -o $@.new
mv $@.new $@
%.gmo: %.po
$(MSGFMT) -c -o $@ $<
clean:
$(RMF) $(PACKAGE).pot
$(RMF) $(MO_FILES)