This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Toplevel Makefile.tpl cleanup 1/n
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org, gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com, dj at redhat dot com
- Date: Tue, 25 Feb 2003 15:36:59 -0500
- Subject: Toplevel Makefile.tpl cleanup 1/n
This enormous patch should have no effect. :-) It cleans up the many settings
of Make macros by sorting them into sections; it doesn't actually add or
delete anything. You'll probably find the fulltext more enlightening.
The main purpose is to increase maintainability of this file. There are more
rearrangement cleanups like this which I may be able to do, but this is enough
for one pass.
Currently bootstrapping on i686-pc-linux-gnu just in case I made some silly
mistake. If that's OK, can I put this in?
* Makefile.tpl: Rearrange.
* Makefile.in: Regenerate.
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.35
diff -c -3 -r1.35 Makefile.tpl
*** Makefile.tpl 21 Feb 2003 01:55:04 -0000 1.35
--- Makefile.tpl 25 Feb 2003 20:27:30 -0000
***************
*** 23,30 ****
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
VPATH= at srcdir@
- links= at configlinks@
build_alias= at build_alias@
build_cpu= at build_cpu@
--- 23,32 ----
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+ # -------------------------------
+ # Standard Autoconf-set variables
+ # -------------------------------
VPATH= at srcdir@
build_alias= at build_alias@
build_cpu= at build_cpu@
***************
*** 42,62 ****
target_os= at target_os@
target_canonical= at target_cpu@- at target_vendor@- at target_os@
! enable_shared = @enable_shared@
! enable_threads = @enable_threads@
! enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
! # The file containing GCC's version number.
! gcc_version_trigger = @gcc_version_trigger@
! gcc_version = @gcc_version@
!
! # The gcc driver likes to know the arguments it was configured with.
! TOPLEVEL_CONFIGURE_ARGUMENTS= at TOPLEVEL_CONFIGURE_ARGUMENTS@
!
! srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
--- 44,56 ----
target_os= at target_os@
target_canonical= at target_cpu@- at target_vendor@- at target_os@
! program_transform_name = @program_transform_name@
prefix = @prefix@
exec_prefix = @exec_prefix@
+ srcdir = @srcdir@
+
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
***************
*** 69,82 ****
oldincludedir = @oldincludedir@
infodir = @infodir@
mandir = @mandir@
- gxx_include_dir = @gxx_include_dir@
- libstdcxx_incdir = @libstdcxx_incdir@
-
- tooldir = @tooldir@
- build_tooldir = @build_tooldir@
-
- program_transform_name = @program_transform_name@
-
man1dir = $(mandir)/man1
man2dir = $(mandir)/man2
man3dir = $(mandir)/man3
--- 63,68 ----
***************
*** 86,102 ****
man7dir = $(mandir)/man7
man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
- # Directory in which the compiler finds executables, libraries, etc.
- libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
- GDB_NLM_DEPS =
-
- SHELL = @config_shell@
-
- # pwd command to use. Allow user to override default by setting PWDCMD in
- # the environment to account for automounters. The make variable must not
- # be called PWDCMD, otherwise the value set here is passed to make
- # subprocesses and overrides the setting from the user's environment.
- PWD = $${PWDCMD-pwd}
# INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
# cygwin host.
--- 72,77 ----
***************
*** 107,158 ****
INSTALL_SCRIPT = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
! AS = @AS@
! AR = @AR@
! AR_FLAGS = rc
! RANLIB = @RANLIB@
! CC = @CC@
! # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
! # here so that they can be overridden by Makefile fragments.
! BUILD_CC = $(CC_FOR_BUILD)
! BUILD_PREFIX = @BUILD_PREFIX@
! BUILD_PREFIX_1 = @BUILD_PREFIX_1@
! CFLAGS = @CFLAGS@
! CXXFLAGS = @CXXFLAGS@
! LDFLAGS =
! LIBCFLAGS = $(CFLAGS)
! CFLAGS_FOR_BUILD = $(CFLAGS)
! # During gcc bootstrap, if we use some random cc for stage1 then
! # CFLAGS will be just -g. We want to ensure that TARGET libraries
! # (which we know are built with gcc) are built with optimizations so
! # prepend -O2 when setting CFLAGS_FOR_TARGET.
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
! LDFLAGS_FOR_TARGET =
! LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
! PICFLAG =
! PICFLAG_FOR_TARGET =
! CXX = @CXX@
! # Use -O2 to stress test the compiler.
! LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
! LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
! DLLTOOL = @DLLTOOL@
! WINDRES = @WINDRES@
! NM = @NM@
! LD = @LD@
! # These values are substituted by configure.
! DEFAULT_YACC = @DEFAULT_YACC@
! DEFAULT_LEX = @DEFAULT_LEX@
! DEFAULT_M4 = @DEFAULT_M4@
BISON= at BISON@
USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
--- 82,173 ----
INSTALL_SCRIPT = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
! # -------------------------------------------------
! # Miscellaneous non-standard autoconf-set variables
! # -------------------------------------------------
! links= at configlinks@
! enable_shared = @enable_shared@
! enable_threads = @enable_threads@
! enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
! # The file containing GCC's version number.
! gcc_version_trigger = @gcc_version_trigger@
! gcc_version = @gcc_version@
! # The gcc driver likes to know the arguments it was configured with.
! TOPLEVEL_CONFIGURE_ARGUMENTS= at TOPLEVEL_CONFIGURE_ARGUMENTS@
! gxx_include_dir = @gxx_include_dir@
! libstdcxx_incdir = @libstdcxx_incdir@
! tooldir = @tooldir@
! build_tooldir = @build_tooldir@
! # Directory in which the compiler finds executables, libraries, etc.
! libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
! GDB_NLM_DEPS =
! # This is the name of the environment variable used for the path to
! # the libraries.
! RPATH_ENVVAR = @RPATH_ENVVAR@
! # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
! # was used.
! SET_LIB_PATH = @SET_LIB_PATH@
! # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
! # Some platforms don't like blank entries, so we remove duplicate,
! # leading and trailing colons.
! REALLY_SET_LIB_PATH = \
! $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
! # This is the list of directories to be built for the build system.
! BUILD_CONFIGDIRS = libiberty
! # Build programs are put under this directory.
! BUILD_SUBDIR = @build_subdir@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the build system.
! BUILD_CONFIGARGS = @build_configargs@
!
! # This is the list of directories to built for the host system.
! SUBDIRS = @configdirs@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the host system.
! HOST_CONFIGARGS = @host_configargs@
!
! # This is set by the configure script to the list of directories which
! # should be built using the target tools.
! TARGET_CONFIGDIRS = @target_configdirs@
! # Target libraries are put under this directory:
! TARGET_SUBDIR = @target_subdir@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the target.
! TARGET_CONFIGARGS = @target_configargs@
!
! # ----------------------------------------------
! # Programs producing files for the BUILD machine
! # ----------------------------------------------
!
! SHELL = @config_shell@
!
! # pwd command to use. Allow user to override default by setting PWDCMD in
! # the environment to account for automounters. The make variable must not
! # be called PWDCMD, otherwise the value set here is passed to make
! # subprocesses and overrides the setting from the user's environment.
! PWD = $${PWDCMD-pwd}
!
! # compilers to use to create programs which must be run in the build
! # environment.
! CC_FOR_BUILD = @CC_FOR_BUILD@
! CFLAGS_FOR_BUILD = $(CFLAGS)
!
! CXX_FOR_BUILD = $(CXX)
!
! # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
! # here so that they can be overridden by Makefile fragments.
! BUILD_CC = $(CC_FOR_BUILD)
! BUILD_PREFIX = @BUILD_PREFIX@
! BUILD_PREFIX_1 = @BUILD_PREFIX_1@
BISON= at BISON@
USUAL_BISON = `if [ -f $$r/bison/bison ] ; then \
***************
*** 161,166 ****
--- 176,182 ----
echo bison ; \
fi`
+ DEFAULT_YACC = @DEFAULT_YACC@
YACC= at YACC@
USUAL_YACC = `if [ -f $$r/bison/bison ] ; then \
echo $$r/bison/bison -y -L $$s/bison/ ; \
***************
*** 170,180 ****
--- 186,198 ----
echo ${DEFAULT_YACC} ; \
fi`
+ DEFAULT_LEX = @DEFAULT_LEX@
LEX= at LEX@
USUAL_LEX = `if [ -f $$r/flex/flex ] ; \
then echo $$r/flex/flex ; \
else echo ${DEFAULT_LEX} ; fi`
+ DEFAULT_M4 = @DEFAULT_M4@
M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
else echo ${DEFAULT_M4} ; fi`
***************
*** 201,274 ****
then echo $$s/dejagnu/runtest ; \
else echo runtest ; fi`
! # compilers to use to create programs which must be run in the build
! # environment.
! CC_FOR_BUILD = @CC_FOR_BUILD@
! CXX_FOR_BUILD = $(CXX)
! SUBDIRS = @configdirs@
! # This is set by the configure script to the list of directories which
! # should be built using the target tools.
! TARGET_CONFIGDIRS = @target_configdirs@
! # Target libraries are put under this directory:
! # Changed by configure to $(target_alias) if cross.
! TARGET_SUBDIR = @target_subdir@
! BUILD_CONFIGDIRS = libiberty
! BUILD_SUBDIR = @build_subdir@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the build system.
! BUILD_CONFIGARGS = @build_configargs@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the host system.
! HOST_CONFIGARGS = @host_configargs@
! # This is set by the configure script to the arguments to use when configuring
! # directories built for the target.
! TARGET_CONFIGARGS = @target_configargs@
! # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
! # was used.
! SET_LIB_PATH = @SET_LIB_PATH@
! # This is the name of the environment variable used for the path to
! # the libraries. This may be changed by configure.in.
! RPATH_ENVVAR = @RPATH_ENVVAR@
! # This is the list of directories that may be needed in RPATH_ENVVAR
! # so that programs built for the host machine work.
! HOST_LIB_PATH = $$r/bfd:$$r/opcodes
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
- # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
- # Some platforms don't like blank entries, so we remove duplicate,
- # leading and trailing colons.
- REALLY_SET_LIB_PATH = \
- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
-
- # Should be substed by configure.in
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
- CC_FOR_TARGET = @CC_FOR_TARGET@
- CXX_FOR_TARGET = @CXX_FOR_TARGET@
- RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
- CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
- RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_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
! # build libgcc2.a. We define it here so that it can itself be
! # overridden on the command line.
! GCC_FOR_TARGET= at GCC_FOR_TARGET@
! USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
AS_FOR_TARGET= at AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \
--- 219,279 ----
then echo $$s/dejagnu/runtest ; \
else echo runtest ; fi`
+ # ---------------------------------------------
+ # Programs producing files for the HOST machine
+ # ---------------------------------------------
! # This is the list of directories that may be needed in RPATH_ENVVAR
! # so that programs built for the host machine work.
! HOST_LIB_PATH = $$r/bfd:$$r/opcodes
! AS = @AS@
! AR = @AR@
! AR_FLAGS = rc
! CC = @CC@
! CFLAGS = @CFLAGS@
! LIBCFLAGS = $(CFLAGS)
! CXX = @CXX@
! CXXFLAGS = @CXXFLAGS@
! LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! DLLTOOL = @DLLTOOL@
! NM = @NM@
! LD = @LD@
! LDFLAGS =
! RANLIB = @RANLIB@
! WINDRES = @WINDRES@
! PICFLAG =
!
! # -----------------------------------------------
! # Programs producing files for the TARGET machine
! # -----------------------------------------------
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
! AR_FOR_TARGET= at AR_FOR_TARGET@
! USUAL_AR_FOR_TARGET = ` \
! if [ -f $$r/binutils/ar ] ; then \
! echo $$r/binutils/ar ; \
! else \
! if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(AR); \
! else \
! echo ar | sed '$(program_transform_name)' ; \
! fi; \
! fi`
AS_FOR_TARGET= at AS_FOR_TARGET@
USUAL_AS_FOR_TARGET = ` \
***************
*** 284,302 ****
fi; \
fi`
! LD_FOR_TARGET= at LD_FOR_TARGET@
! USUAL_LD_FOR_TARGET = ` \
! if [ -f $$r/ld/ld-new ] ; then \
! echo $$r/ld/ld-new ; \
! elif [ -f $$r/gcc/xgcc ]; then \
! $(CC_FOR_TARGET) -print-prog-name=ld ; \
! else \
! if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(LD); \
! else \
! echo ld | sed '$(program_transform_name)' ; \
! fi; \
! fi`
DLLTOOL_FOR_TARGET= at DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \
--- 289,314 ----
fi; \
fi`
! CC_FOR_TARGET = @CC_FOR_TARGET@
! # During gcc bootstrap, if we use some random cc for stage1 then
! # CFLAGS will be just -g. We want to ensure that TARGET libraries
! # (which we know are built with gcc) are built with optimizations so
! # prepend -O2 when setting CFLAGS_FOR_TARGET.
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
! # 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
! # build libgcc2.a. We define it here so that it can itself be
! # overridden on the command line.
! GCC_FOR_TARGET= at GCC_FOR_TARGET@
! USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
! LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
!
! CXX_FOR_TARGET = @CXX_FOR_TARGET@
! RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
! CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
! RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
! LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET= at DLLTOOL_FOR_TARGET@
USUAL_DLLTOOL_FOR_TARGET = ` \
***************
*** 310,336 ****
fi; \
fi`
! WINDRES_FOR_TARGET= at WINDRES_FOR_TARGET@
! USUAL_WINDRES_FOR_TARGET = ` \
! if [ -f $$r/binutils/windres ] ; then \
! echo $$r/binutils/windres ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(WINDRES); \
else \
! echo windres | sed '$(program_transform_name)' ; \
fi; \
fi`
! AR_FOR_TARGET= at AR_FOR_TARGET@
! USUAL_AR_FOR_TARGET = ` \
! if [ -f $$r/binutils/ar ] ; then \
! echo $$r/binutils/ar ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(AR); \
else \
! echo ar | sed '$(program_transform_name)' ; \
fi; \
fi`
--- 322,356 ----
fi; \
fi`
! GCJ_FOR_TARGET = @GCJ_FOR_TARGET@
!
! LD_FOR_TARGET= at LD_FOR_TARGET@
! USUAL_LD_FOR_TARGET = ` \
! if [ -f $$r/ld/ld-new ] ; then \
! echo $$r/ld/ld-new ; \
! elif [ -f $$r/gcc/xgcc ]; then \
! $(CC_FOR_TARGET) -print-prog-name=ld ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(LD); \
else \
! echo ld | sed '$(program_transform_name)' ; \
fi; \
fi`
! LDFLAGS_FOR_TARGET =
!
! NM_FOR_TARGET= at NM_FOR_TARGET@
! USUAL_NM_FOR_TARGET = ` \
! if [ -f $$r/binutils/nm-new ] ; then \
! echo $$r/binutils/nm-new ; \
! elif [ -f $$r/gcc/xgcc ]; then \
! $(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(NM); \
else \
! echo nm | sed '$(program_transform_name)' ; \
fi; \
fi`
***************
*** 350,368 ****
fi; \
fi`
! NM_FOR_TARGET= at NM_FOR_TARGET@
! USUAL_NM_FOR_TARGET = ` \
! if [ -f $$r/binutils/nm-new ] ; then \
! echo $$r/binutils/nm-new ; \
! elif [ -f $$r/gcc/xgcc ]; then \
! $(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(NM); \
else \
! echo nm | sed '$(program_transform_name)' ; \
fi; \
fi`
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
--- 370,392 ----
fi; \
fi`
! WINDRES_FOR_TARGET= at WINDRES_FOR_TARGET@
! USUAL_WINDRES_FOR_TARGET = ` \
! if [ -f $$r/binutils/windres ] ; then \
! echo $$r/binutils/windres ; \
else \
if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
! echo $(WINDRES); \
else \
! echo windres | sed '$(program_transform_name)' ; \
fi; \
fi`
+
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
+ # Miscellaneous targets and flag lists
+ # ------------------------------------
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.