diff options
author | Pablo Saratxaga <pablo@mandriva.com> | 2002-08-23 00:50:14 +0000 |
---|---|---|
committer | Pablo Saratxaga <pablo@mandriva.com> | 2002-08-23 00:50:14 +0000 |
commit | 584d2eca1f6fe74be87c371d99a713176965f9f9 (patch) | |
tree | 225c49c0656057e01c92a9dd7340c64120e62e4f /po/Makefile | |
parent | 8cb296dff1704b8b7247ebe8635a54e8336edb58 (diff) | |
download | drakwizard-584d2eca1f6fe74be87c371d99a713176965f9f9.tar drakwizard-584d2eca1f6fe74be87c371d99a713176965f9f9.tar.gz drakwizard-584d2eca1f6fe74be87c371d99a713176965f9f9.tar.bz2 drakwizard-584d2eca1f6fe74be87c371d99a713176965f9f9.tar.xz drakwizard-584d2eca1f6fe74be87c371d99a713176965f9f9.zip |
copied fake_c.pl from other modules, and converted wiz2pot into
wiz2fake_c; so now the pot file can be easily rebuild to match the
source files.
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/po/Makefile b/po/Makefile index a51162e2..69eb4239 100644 --- a/po/Makefile +++ b/po/Makefile @@ -1,12 +1,43 @@ # Installation directories localedir = ${prefix}/share/locale -LANGS = $(shell ls *.po | xargs -i basename {} .po ) PGOAL = drakwizard -GOALS = $(foreach a, $(LANGS), $(a).mo) +# *.wiz files +WIZFILES = $(shell find .. -type f -name "*.wiz") +# perl files with translatable strings +PL_FILES = ../drakwizard.pl -all: $(GOALS) +WIZCFILES = $(WIZFILES:%=%_.c) +PL_CFILES = $(PL_FILES:%=%_.c) + +POFILES = $(shell ls *.po) +MOFILES = $(POFILES:%.po=%.mo) +LANGS = $(POFILES:%.po=%) + +all: $(PGOAL).pot $(MOFILES) + +$(WIZCFILES): %_.c: % + ../wiz2fake_c.pl $< > $@ + +$(PL_CFILES): %_.c: % + ./fake_c.pl $< > $@ + +%.mo: %.po + msgfmt -o $@ $< + +merge: $(PGOAL).pot + @for n in $(POFILES); do \ + echo "Merging $$n"; \ + msgmerge "$$n" $< > "$$n"t; \ + mv -f "$$n"t "$$n"; \ + done + +$(PGOAL).pot: $(PL_CFILES) $(WIZCFILES) + xgettext -F -n --add-comments='-PO' \ + --keyword=_ --keyword=__ --keyword=N_ \ + --language=C -o $@ $(PL_CFILES) $(WIZCFILES) + @rm -rf $(PL_CFILES) $(WIZCFILES) install: all for l in $(LANGS); do \ @@ -15,11 +46,5 @@ install: all done clean: - rm -f *~ *.[oas] *.mo $(GOALS) TAGS - -%.h: - @touch $@ - -%.mo: %.po - msgfmt -o $@ $< + @rm -rf *.mo $(POFILES:%=%t) $(PL_CFILES) $(WIZCFILES) $(PGOAL).pot |