From 7d14c54656daa726998f3264f385167c9c64e284 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Thu, 17 Dec 2015 17:11:25 +0900 Subject: 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. --- gettext-runtime/po/Makefile.in.in | 7 ++++++- gettext-runtime/po/Rules-quot | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gettext-runtime/po/Makefile.in.in b/gettext-runtime/po/Makefile.in.in index fa59cf1..c51eb9e 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 9dc9630..baf6528 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/@.*//'`; \ -- cgit v1.1