From: Daiki Ueno Date: Thu, 17 Dec 2015 08:11:25 +0000 (+0900) Subject: po: Prefer to use host tools when cross compiling X-Git-Tag: v0.19.7~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d14c54656daa726998f3264f385167c9c64e284;p=thirdparty%2Fgettext.git po: Prefer to use host tools when cross compiling * gettext-runtime/po/Makefile.in.in (CROSS_COMPILING): New substitute variable. (.nop.po-update): Don't prepend ../src to $PATH when cross compiling. * gettext-runtime/po/Rules-quot (.insert-header.po-update-en): Likewise. --- diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index fa59cf1ed..c51eb9e6d 100644 --- a/gettext-runtime/po/Makefile.in.in +++ b/gettext-runtime/po/Makefile.in.in @@ -43,6 +43,11 @@ install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ +# When building gettext-tools, we prefer to use the built programs +# rather than installed programs. However, we can't do that when we +# are cross compiling. +CROSS_COMPILING = @CROSS_COMPILING@ + GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ @@ -430,7 +435,7 @@ update-po: Makefile .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ diff --git a/gettext-runtime/po/Rules-quot b/gettext-runtime/po/Rules-quot index 9dc963076..baf652858 100644 --- a/gettext-runtime/po/Rules-quot +++ b/gettext-runtime/po/Rules-quot @@ -15,7 +15,7 @@ en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ + if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \