From: Bruno Haible Date: Mon, 16 Sep 2024 16:43:22 +0000 (+0200) Subject: build: Fix "make distcheck" after the line-breaking algorithm changed. X-Git-Tag: v0.23~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=714d764a091e1ab96fea534529641f54c147346c;p=thirdparty%2Fgettext.git build: Fix "make distcheck" after the line-breaking algorithm changed. * 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. --- diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index 2b36b1112..a27eb6981 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -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) \ diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 56df96f00..7399f56e4 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -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],