This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
top level configuration: Make autoconfier
- From: Nathanael Nerode <neroden at doctormoo dot dyndns dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com,dj at redhat dot com
- Date: Wed, 25 Sep 2002 13:12:29 -0400
- Subject: top level configuration: Make autoconfier
This is a cosmetic change. It allows Makefile.in to look more autoconfy, by
replacing (some of) the sed statements in configure.in with sed statements
which substitute for autoconf-type patterns. This will save on the number
of meaningless changes to Makefile.in when full autoconfiscation happens.
It also makes it marginally harder for accidental missubstitutions to happen.
Tested by configuring on i686-pc-linux-gnu; the resulting Makefile was
unchanged.
I'm going to be doing a lot more of this before autoconfiscation.
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.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.114
diff -u -3 -r1.114 Makefile.in
--- Makefile.in 25 Sep 2002 16:56:30 -0000 1.114
+++ Makefile.in 25 Sep 2002 17:11:05 -0000
@@ -43,7 +43,7 @@
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 @@
# 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_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
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.2
diff -u -3 -r1.2 Makefile.tpl
--- Makefile.tpl 25 Sep 2002 16:49:39 -0000 1.2
+++ Makefile.tpl 25 Sep 2002 17:11:06 -0000
@@ -46,7 +46,7 @@
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 @@
# 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_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
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.181
diff -u -3 -r1.181 configure.in
--- configure.in 24 Sep 2002 22:51:57 -0000 1.181
+++ configure.in 25 Sep 2002 17:11:08 -0000
@@ -1542,17 +1542,17 @@
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