aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas B Rupp <rupp@gnat.com>2001-12-05 07:40:39 -0500
committerRichard Kenner <kenner@gcc.gnu.org>2001-12-05 07:40:39 -0500
commit4ee43206b1a8daec35f41514f4f3a4bcca0c5c6e (patch)
tree0450d3ffdb3f1d75ea144aaca62de0de01ed658f
parent5f98259ade3fbc7d315a168294e7f8751ac3bd04 (diff)
downloadgcc-4ee43206b1a8daec35f41514f4f3a4bcca0c5c6e.zip
gcc-4ee43206b1a8daec35f41514f4f3a4bcca0c5c6e.tar.gz
gcc-4ee43206b1a8daec35f41514f4f3a4bcca0c5c6e.tar.bz2
* configure, configure.in: Use temp file for long sed commands.
From-SVN: r47669
-rw-r--r--ChangeLog4
-rwxr-xr-xconfigure11
-rw-r--r--configure.in31
3 files changed, 29 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index ee67120..f28ed74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed Dec 5 07:33:45 2001 Douglas B. Rupp <rupp@gnat.com>
+
+ * configure, configure.in: Use temp file for long sed commands.
+
2001-12-03 Laurent Guerby <guerby@acm.org>
* config.sub: Update to version 1.232 on subversion.
diff --git a/configure b/configure
index afc5bec..8c6870a 100755
--- a/configure
+++ b/configure
@@ -89,7 +89,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
-version="$Revision: 1.38 $"
+version="$Revision: 1.39 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
@@ -1370,9 +1370,14 @@ EOF
# remove any form feeds.
if [ -z "${subdirs}" ]; then
rm -f ${subdir}/Makefile.tm2
- sed -e "s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:" \
- -e "s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
+ sedtemp=sed.$$
+ cat >$sedtemp <<EOF
+s:^SUBDIRS[ ]*=.*$:SUBDIRS = ${configdirs}:
+s:^NONSUBDIRS[ ]*=.*$:NONSUBDIRS = ${noconfigdirs}:
+EOF
+ sed -f $sedtemp \
${subdir}/Makefile.tem > ${subdir}/Makefile.tm2
+ rm -f $sedtemp
rm -f ${subdir}/Makefile.tem
mv ${subdir}/Makefile.tm2 ${subdir}/Makefile.tem
fi
diff --git a/configure.in b/configure.in
index 7df47b3..59942e9 100644
--- a/configure.in
+++ b/configure.in
@@ -1554,20 +1554,23 @@ qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
# macros.
qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
- -e "s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%" \
- -e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \
- -e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
- -e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
- -e "s%^GCJ_FOR_TARGET[ ]*=.*$%GCJ_FOR_TARGET = ${GCJ_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%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}%" \
- -e "s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%" \
- -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
- Makefile > Makefile.tem
-rm -f Makefile
+sedtemp=sed.$$
+cat >$sedtemp <<EOF
+s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
+s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%
+s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
+s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%
+s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%
+s%^GCJ_FOR_TARGET[ ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}%
+s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%
+s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%
+s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%
+s%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}%
+s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%
+s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%
+EOF
+sed -f $sedtemp Makefile > Makefile.tem
+rm -f Makefile $sedtemp
mv -f Makefile.tem Makefile
#