1 --- Makefile.in.in 2009-04-28 23:27:08.000000000 +0200
2 +++ Makefile.in.in.new 2009-04-28 23:25:22.000000000 +0200
7 -$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
8 +$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
9 $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
10 --add-comments --keyword=_ --keyword=N_ \
11 --flag=g_strdup_printf:1:c-format \
13 || cp -p $(srcdir)/$$file $(distdir); \
17 - $(MAKE) $(GETTEXT_PACKAGE).pot
18 +### Updating po and gmo files
20 +# Update by merging all .po files with the .po template master file.
22 +# It is possible to update only a single .po file by setting the PO variable to
23 +# either <lang> or <lang>.po when calling make. Example: make update-po PO=is
25 +update-po: Makefile $(srcdir)/$(GETTEXT_PACKAGE).pot
27 + $(foreach lang,$(basename $(if $(strip $(PO)),$(PO),$(CATALOGS))), \
28 + echo -n "$(lang): "; \
29 + if $(MSGMERGE) $(lang).po $(srcdir)/$(GETTEXT_PACKAGE).pot -o $(lang).new.po; then \
30 + mv -f $(lang).new.po $(lang).po; \
32 + echo "msgmerge failed!"; \
33 + rm -f $(lang).new.po; \
38 +update-gmo: Makefile $(CATALOGS)
41 +update-po-orig: Makefile
42 + $(MAKE) $(srcdir)/$(GETTEXT_PACKAGE).pot
45 catalogs='$(CATALOGS)'; \
47 cat=`basename $$cat`; \
48 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
50 - if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
51 + if $(MSGMERGE) $$lang.po $(srcdir)/$(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
52 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
53 rm -f $$tmpdir/$$lang.new.po; \