aboutsummaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile21
1 files changed, 10 insertions, 11 deletions
diff --git a/po/Makefile b/po/Makefile
index f9d5721..e773ff9 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -4,7 +4,7 @@ localedir = $(PREFIX)/usr/share/locale
PGOAL = userdrake
# perl files to search translatable strings in
-PL_FILES = $(shell cat POTFILES.in | sed 's,^,../,' )
+PL_FILES = ../userdrake ../USER/USER.pm
# C-like files to search translatable strings in
CFILES = ../USER/USER.xs
@@ -23,20 +23,19 @@ install: all
done
clean:
- rm -f *~ *.[oas] *.mo TAGS
+ rm -f *~ *.[oas] *.mo TAGS POTFILES.in
%.mo: %.po
msgfmt -o $@ $<
-$(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
+$(PGOAL).pot: $(PL_FILES) $(CFILES) POTFILES.in
+ intltool-update --gettext-package non-perl --pot
+ perl_checker -q --generate-pot .$@ $(PL_FILES)
+ msgcat -w 2048 --use-first .$@ non-perl.pot > $@
+ rm -f non-perl.pot .$@
+
+POTFILES.in:
+ (cd .. ; /bin/ls -1 polkit/*.policy.in USER/*.xs; ) > POTFILES.in
update_n_merge: $(PGOAL).pot merge