$(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) && \
@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) \
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],