]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix "make distcheck" after the line-breaking algorithm changed.
authorBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2024 16:43:22 +0000 (18:43 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 16 Sep 2024 16:43:22 +0000 (18:43 +0200)
* gettext-runtime/po/Makefile.in.in (.po.gmo, $(POFILES)): In the gettext-tools
package, when not cross-compiling, use the locally built msg* programs.
* gettext-tools/configure.ac: When not cross-compiling, set MSGMERGE and
MSGMERGE_FOR_MSGFMT_OPTION to point to locally built msgmerge program.

gettext-runtime/po/Makefile.in.in
gettext-tools/configure.ac

index 2b36b1112ab66ac33cf182b231972c2af6d41bf8..a27eb6981a1ee35491925c5b146b94a1991749d6 100644 (file)
@@ -113,6 +113,7 @@ all: all-@USE_NLS@
 $(GMOFILES): $(srcdir)/$(DOMAIN).pot
 .po.gmo:
        @lang=`echo $* | sed -e 's,.*/,,'`; \
+       if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
        echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
        cd $(srcdir) && \
@@ -247,6 +248,7 @@ $(POFILES): $(POFILESDEPS)
        @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
        if test -f "$(srcdir)/$${lang}.po"; then \
+         if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
          echo "$${cdcmd}$(MSGMERGE_UPDATE) --quiet $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
          cd $(srcdir) \
index 56df96f007e37c22f185e61c461004f116e8a63e..7399f56e4e6c0d759540fc8911d9bcc2cf155293 100644 (file)
@@ -142,6 +142,13 @@ dnl Checks for libraries.
 dnl These are the only lines required to internationalize the package.
 dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.)
 AM_GNU_GETTEXT([use-libtool], [need-ngettext], [\${top_builddir}/../gettext-runtime/intl])
+dnl When not cross-compiling, use the 'msgmerge' program from this package,
+dnl for output consistency with the 'msgfilter' program used to create
+dnl en@quot.po and en@boldquot.po.
+if test "$CROSS_COMPILING" != yes; then
+  MSGMERGE='msgmerge'
+  MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+fi
 
 dnl This option allows to build gettext-tools without (re)building libtextstyle.
 AC_ARG_WITH([installed-libtextstyle],