]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po: Prefer to use host tools when cross compiling
authorDaiki Ueno <ueno@gnu.org>
Thu, 17 Dec 2015 08:11:25 +0000 (17:11 +0900)
committerDaiki Ueno <ueno@gnu.org>
Thu, 17 Dec 2015 08:12:49 +0000 (17:12 +0900)
* 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.

gettext-runtime/po/Makefile.in.in
gettext-runtime/po/Rules-quot

index fa59cf1ed9b1b0eeaf6a1e396f7b92ca27f43dec..c51eb9e6d2b5bd8420a54ce4f26357ec379fa5ec 100644 (file)
@@ -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) && "; \
index 9dc963076f1c058e2b857e86c201b42ae06d793d..baf652858ad314c6e1c288536c6c6066685420fc 100644 (file)
@@ -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/@.*//'`; \