From 0e1ac85c1da556f2beb6d88294de9eb65c067c47 Mon Sep 17 00:00:00 2001
From: neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 25 Sep 2002 17:22:54 +0000
Subject: [PATCH] 2002-09-25  Nathanael Nerode  <neroden@gcc.gnu.org>

	* Makefile.tpl: Rewrite substituted lines to look autoconfy.
	* Makefile.in: Regenerate.
	* configure.in: Rewrite sed statements to look autoconfy.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57503 138bc75d-0d04-0410-961f-82ee72b054a4
---
 ChangeLog    |  5 +++++
 Makefile.in  | 22 +++++++++++-----------
 Makefile.tpl | 22 +++++++++++-----------
 configure.in | 22 +++++++++++-----------
 4 files changed, 38 insertions(+), 33 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 83da72c2c5b9..ebe529adb0cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 2002-09-25  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+	* Makefile.tpl: Rewrite substituted lines to look autoconfy.
+	* Makefile.in: Regenerate.
+	* configure.in: Rewrite sed statements to look autoconfy.
+
 	* Makefile.tpl: Autogenerate *-target-* lists, dependencies of
 	all-target-foo on configure-target-foo.
 	* Makefile.def: Ditto.
diff --git a/Makefile.in b/Makefile.in
index 7c45d10552b3..8d92044556cc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -43,7 +43,7 @@ includedir=${prefix}/include
 oldincludedir=/usr/include
 infodir=${prefix}/info
 mandir=${prefix}/man
-gxx_include_dir=${includedir}/g++
+gxx_include_dir=@gxx_include_dir@
 
 tooldir = $(exec_prefix)/$(target_alias)
 build_tooldir = $(exec_prefix)/$(target_alias)
@@ -188,22 +188,22 @@ OTHERS =
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes libf2c libobjc
+TARGET_CONFIGDIRS = @target_configdirs@
 
 # Target libraries are put under this directory:
 # Changed by configure to $(target_alias) if cross.
-TARGET_SUBDIR = .
+TARGET_SUBDIR = @target_subdir@
 
 BUILD_CONFIGDIRS = libiberty
-BUILD_SUBDIR = .
+BUILD_SUBDIR = @build_subdir@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the target.
-TARGET_CONFIGARGS = 
+TARGET_CONFIGARGS = @target_configargs@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the build system.
-BUILD_CONFIGARGS =
+BUILD_CONFIGARGS = @build_configargs@
 
 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
 # was used.
@@ -243,11 +243,11 @@ INSTALL_TARGET_CROSS = installdirs \
 	$(INSTALL_DOSREL)
 
 # Should be substed by configure.in
-FLAGS_FOR_TARGET =
-CC_FOR_TARGET =
-CXX_FOR_TARGET =
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
-GCJ_FOR_TARGET =
+FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
+CC_FOR_TARGET = @CC_FOR_TARGET@
+CXX_FOR_TARGET = @CXX_FOR_TARGET@
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
+GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
 
 # If GCC_FOR_TARGET is not overriden on the command line, then this
 # variable is passed down to the gcc Makefile, where it is used to
diff --git a/Makefile.tpl b/Makefile.tpl
index 394b9cd053aa..9a472b4098f0 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -46,7 +46,7 @@ includedir=${prefix}/include
 oldincludedir=/usr/include
 infodir=${prefix}/info
 mandir=${prefix}/man
-gxx_include_dir=${includedir}/g++
+gxx_include_dir=@gxx_include_dir@
 
 tooldir = $(exec_prefix)/$(target_alias)
 build_tooldir = $(exec_prefix)/$(target_alias)
@@ -191,22 +191,22 @@ OTHERS =
 
 # This is set by the configure script to the list of directories which
 # should be built using the target tools.
-TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib winsup opcodes libf2c libobjc
+TARGET_CONFIGDIRS = @target_configdirs@
 
 # Target libraries are put under this directory:
 # Changed by configure to $(target_alias) if cross.
-TARGET_SUBDIR = .
+TARGET_SUBDIR = @target_subdir@
 
 BUILD_CONFIGDIRS = libiberty
-BUILD_SUBDIR = .
+BUILD_SUBDIR = @build_subdir@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the target.
-TARGET_CONFIGARGS = 
+TARGET_CONFIGARGS = @target_configargs@
 
 # This is set by the configure script to the arguments to use when configuring
 # directories built for the build system.
-BUILD_CONFIGARGS =
+BUILD_CONFIGARGS = @build_configargs@
 
 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
 # was used.
@@ -246,11 +246,11 @@ INSTALL_TARGET_CROSS = installdirs \
 	$(INSTALL_DOSREL)
 
 # Should be substed by configure.in
-FLAGS_FOR_TARGET =
-CC_FOR_TARGET =
-CXX_FOR_TARGET =
-CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
-GCJ_FOR_TARGET =
+FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
+CC_FOR_TARGET = @CC_FOR_TARGET@
+CXX_FOR_TARGET = @CXX_FOR_TARGET@
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
+GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
 
 # If GCC_FOR_TARGET is not overriden on the command line, then this
 # variable is passed down to the gcc Makefile, where it is used to
diff --git a/configure.in b/configure.in
index 8dab42bdfa45..e4a3ae58c4d4 100644
--- a/configure.in
+++ b/configure.in
@@ -1542,17 +1542,17 @@ qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
 
 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 = \$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
-s%^GCJ_FOR_TARGET[      ]*=.*$%GCJ_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
-s%^CXX_FOR_TARGET[ 	]*=.*$%CXX_FOR_TARGET = \$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
-s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ 	]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = \$(STAGE_CC_WRAPPER) ${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}%
+s:@target_configdirs@:${target_configdirs}:
+s%@target_configargs@%${targargs}%
+s%@FLAGS_FOR_TARGET@%${FLAGS_FOR_TARGET}%
+s%@CC_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${CC_FOR_TARGET}%
+s%@GCJ_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${GCJ_FOR_TARGET}%
+s%@CXX_FOR_TARGET@%\$(STAGE_CC_WRAPPER) ${qCXX_FOR_TARGET}%
+s%@CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@%\$(STAGE_CC_WRAPPER) ${qqCXX_FOR_TARGET}%
+s%@target_subdir@%${target_subdir}%
+s%@build_subdir@%${build_subdir}%
+s%@build_configargs@%${buildargs}%
+s%@gxx_include_dir@%${gxx_include_dir}%
 EOF
 sed -f $sedtemp Makefile > Makefile.tem
 rm -f Makefile $sedtemp
-- 
GitLab