summaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile17
1 files changed, 11 insertions, 6 deletions
diff --git a/po/Makefile b/po/Makefile
index f3ae5a31..4b9e8204 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -5,6 +5,9 @@ LANGS = $(shell ls *.po | xargs -i basename {} .po )
PGOAL = mdkonline
GOALS = $(PGOAL).pot $(foreach a, $(LANGS), $(a).mo)
+PL_FILES = ../mdkonline ../mdkupdate
+PL_CFILES = $(PL_FILES:%=%_.c)
+
# $(foreach a, $(LANGS), $($(a).mo))
all: $(GOALS)
@@ -21,10 +24,12 @@ clean:
%.mo: %.po
msgfmt -o $@ $<
-%.pot: POTFILES.in
- xgettext --default-domain=`basename $@ .pot` --directory=.. \
- --add-comments --keyword=__ --keyword=_ --keyword=N_ \
- --keyword=I_ --keyword=i18n \
- --files-from=./POTFILES.in && \
- mv `basename $@ .pot`.po $@
+$(PL_CFILES): %_.c: %
+ ./fake_c.pl $< > $@
+
+%.pot: $(PL_CFILES)
+ xgettext -F -n --add-comments='-PO' --keyword=__ --keyword=_ \
+ --keyword=N_ --keyword=I_ --keyword=i18n \
+ --language=C -o $@ $(PL_CFILES)
+ @rm -rf $(PL_CFILES)