summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-04-02 01:32:45 +0000
committerAlexandre Oliva <aoliva@redhat.com>2001-04-02 01:32:45 +0000
commitdec0cb0ce302ae703bc8530f8b712b7eee92777a (patch)
tree30ae9973d5942a3497ce13fd34523bd91cc6cec5 /configure.in
parent94202e16cfb15f87f50d765242b42d6cba78ac82 (diff)
downloadppe42-binutils-dec0cb0ce302ae703bc8530f8b712b7eee92777a.tar.gz
ppe42-binutils-dec0cb0ce302ae703bc8530f8b712b7eee92777a.zip
* Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS):
New macros. (bootstrap, cross): Use RECURSE_FLAGS. * configure.in: Subst CXX_FOR_TARGET_FOR_RECURSIVE_MAKE.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 5357470020..cc8f34f879 100644
--- a/configure.in
+++ b/configure.in
@@ -1384,7 +1384,15 @@ case $CXX_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+
+# We want to defer the evaluation of `cmd`s and shell variables in
+# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
+# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
+# quotes, but we still have to duplicate `$'s so that shell variables
+# can be expanded by the nested make as shell variables, not as make
+# macros.
+qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
@@ -1393,6 +1401,7 @@ sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:"
-e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
-e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
-e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \
+ -e "s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%" \
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
-e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile > Makefile.tem
OpenPOWER on IntegriCloud