--- po/Makefile.in.in.clean 2002-10-22 20:33:55.000000000 +0200 +++ po/Makefile.in.in 2002-10-22 22:02:13.000000000 +0200 @@ -7,6 +7,10 @@ # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. +# +# - Modified by Intltool to use intltool instead of gettext directly. +# +# GENPOT PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -16,6 +20,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ +top_builddir = .. VPATH = @srcdir@ prefix = @prefix@ @@ -29,11 +34,13 @@ MKINSTALLDIRS = @MKINSTALLDIRS@ mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac` +DOMAIN = $(GETTEXT_PACKAGE) GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ -MSGMERGE = msgmerge -MSGMERGE_UPDATE = @MSGMERGE@ --update +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --dist --gettext-package $(DOMAIN) MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -81,25 +88,9 @@ # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' - test ! -f $(DOMAIN).po || { \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ - sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ - if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ - else \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - else \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - } +$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in + INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT); \ + $(INTLTOOL_UPDATE) --pot --gettext-package $(DOMAIN) $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update @@ -107,9 +98,8 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot - + echo "$${cdcmd}$(INTLTOOL_UPDATE) $${lang}.po"; \ + cd $(srcdir) && $(INTLTOOL_UPDATE) $${lang}; install: install-exec install-data install-exec: @@ -282,23 +272,11 @@ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(INTLTOOL_MERGE) $$lang"; \ cd $(srcdir); \ - if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi + $(INTLTOOL_MERGE) $$lang || \ + (echo "intltool-update for $$lang.po failed!" 1>&2; \ + cp $$lang.old.po $$lang.po;) $(DUMMYPOFILES):