diff options
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 0000000..7ead00c --- /dev/null +++ b/po/Makefile @@ -0,0 +1,45 @@ +# Installation directories +localedir = $(PREFIX)/usr/share/locale + +PGOAL = drakpxelinux + +# perl files to search translatable strings in +PL_FILES = ../drakpxelinux.pl +# C-like files to search translatable strings in +#CFILES = ./placeholder.h + +POFILES = $(shell ls *.po) +MOFILES = $(POFILES:%.po=%.mo) +LANGS = $(POFILES:%.po=%) + +GOALS = $(PGOAL).pot $(MOFILES) + + +all: $(GOALS) + +%.mo: %.po + msgfmt -o $@ $< + +placeholder.h: + ./create_placeholder + +merge: $(PGOAL).pot + @for n in $(POFILES); do \ + echo "Merging $$n"; \ + msgmerge "$$n" $< > "$$n"t; \ + mv -f "$$n"t "$$n"; \ + done + +$(PGOAL).pot: $(CFILES) + perl_checker -q --generate-pot $(PGOAL).pot $(PL_FILES) + +install: all + for l in $(LANGS); do \ + install -d $(localedir)/$$l/LC_MESSAGES; \ + install -m 644 $$l.mo $(localedir)/$$l/LC_MESSAGES/$(PGOAL).mo; \ + done + +clean: + @rm -rf *~ *.mo $(MOFILES) + + |