This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

(toplevel patch) more autoconf-style substitutions


Subsitute a few more things in an autoconf-friendly manner.   This now works
because these variables are now only set once.

	* Makefile.tpl: Substitute more autoconfily.
	* configure: Substitute more autoconfily.
	* Makefile.in: Regenerate.


Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.5.2.24
diff -u -r1.5.2.24 Makefile.tpl
--- Makefile.tpl	8 Dec 2002 22:39:49 -0000	1.5.2.24
+++ Makefile.tpl	11 Dec 2002 00:24:02 -0000
@@ -112,7 +112,7 @@
 AS = @AS@
 AR = @AR@
 AR_FLAGS = rc
-CC = cc
+CC = @CC@
 
 # Special variables passed down in EXTRA_GCC_FLAGS.  They are defined
 # here so that they can be overridden by Makefile fragments.
@@ -120,9 +120,8 @@
 BUILD_PREFIX = @BUILD_PREFIX@
 BUILD_PREFIX_1 = @BUILD_PREFIX_1@
 
-# These flag values are normally overridden by the configure script.
-CFLAGS = -g
-CXXFLAGS = -g -O2
+CFLAGS = @CFLAGS@
+CXXFLAGS = @CXXFLAGS@
 
 LDFLAGS = 
 LIBCFLAGS = $(CFLAGS)
@@ -137,7 +136,7 @@
 PICFLAG = 
 PICFLAG_FOR_TARGET = 
 
-CXX = c++
+CXX = @CXX@
 
 # Use -O2 to stress test the compiler.
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/configure,v
retrieving revision 1.46.6.9
diff -u -r1.46.6.9 configure
--- configure	5 Dec 2002 18:33:14 -0000	1.46.6.9
+++ configure	11 Dec 2002 00:24:13 -0000
@@ -1279,34 +1279,10 @@
       -e "s|@oldincludedir@|${oldincludedir}|" \
       -e "s|@infodir@|${infodir}|" \
       -e "s|@mandir@|${mandir}|" \
-      -e "/^CC[ 	]*=/{
-          :loop1
-          /\\\\$/ N
-          s/\\\\\\n//g
-          t loop1
-          s%^CC[ 	]*=.*$%CC = ${CC}%
-          }" \
-      -e "/^CXX[ 	]*=/{
-          :loop2
-          /\\\\$/ N
-          s/\\\\\\n//g
-          t loop2
-          s%^CXX[ 	]*=.*$%CXX = ${CXX}%
-          }" \
-      -e "/^CFLAGS[ 	]*=/{
-          :loop3
-          /\\\\$/ N
-          s/\\\\\\n//g
-          t loop3
-          s%^CFLAGS[ 	]*=.*$%CFLAGS = ${CFLAGS}%
-          }" \
-      -e "/^CXXFLAGS[ 	]*=/{
-          :loop4
-          /\\\\$/ N
-          s/\\\\\\n//g
-          t loop4
-          s%^CXXFLAGS[ 	]*=.*$%CXXFLAGS = ${CXXFLAGS}%
-          }" \
+      -e "s|@CC@|${CC}|" \
+      -e "s|@CXX@|${CXX}|" \
+      -e "s|@CC@|${CFLAGS}|" \
+      -e "s|@CXXFLAGS@|${CXXFLAGS}|" \
       -e "s|@config_shell@|${config_shell}|" \
       -e "s|@srcdir@|${srcdir}|" \
       -e "s///" \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]