aboutsummaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile23
1 files changed, 10 insertions, 13 deletions
diff --git a/po/Makefile b/po/Makefile
index da4bd31..9d7bcad 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -8,7 +8,6 @@ PL_FILES = $(shell cat POTFILES.in | sed 's,^,../,' )
# C-like files to search translatable strings in
#CFILES =
-PL_CFILES = $(PL_FILES:%=%_.c)
POFILES = $(shell ls *.po)
MOFILES = $(POFILES:%.po=%.mo)
LANGS = $(POFILES:%.po=%)
@@ -24,22 +23,20 @@ install: all
done
clean:
- rm -f *~ *.[oas] *.mo $(GOALS) TAGS $(MOFILES) $(PL_CFILES)
+ rm -f *~ *.[oas] *.mo $(GOALS) TAGS $(MOFILES)
%.mo: %.po
msgfmt -o $@ $<
-$(PGOAL).pot: POTFILES.in $(PL_CFILES) $(CFILES)
- xgettext -F -n --default-domain=$(PGOAL) \
- --add-comments='-PO' \
- --keyword=_ --keyword=__ --keyword=N_ --keyword=N \
- --keyword=I_ --keyword=i18n \
- --language=C $(PL_CFILES) $(CFILES)
- mv $(PGOAL).po $@
- @rm -rf $(PL_CFILES)
-
-$(PL_CFILES): %_.c: %
- ./fake_c.pl $< > $@
+$(PGOAL).pot: POTFILES.in $(PL_FILES) $(CFILES)
+ #xgettext -F -n --add-comments \
+ #--keyword=_ --keyword=__ --keyword=N_ --keyword=N \
+ #--keyword=gettext \
+ #--language=C -o placeholder.pot $(CFILES)
+ touch placeholder.pot
+ perl_checker -q --generate-pot $(PGOAL)_tmp.pot $(PL_FILES) || rm -f $(PGOAL)_tmp.pot
+ [ ! -e $(PGOAL)_tmp.pot ] || msgcat --use-first placeholder.pot $(PGOAL)_tmp.pot > $@
+ rm -f placeholder.pot $(PGOAL)_tmp.pot
merge: $(PGOAL).pot
@for n in $(POFILES); do \