From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-patches@gcc.gnu.org
Cc: dj@redhat.com, binutils@sources.redhat.com,
gdb-patches@sources.redhat.com
Subject: top level patch: even MORE autoconfiness
Date: Mon, 11 Nov 2002 20:37:00 -0000 [thread overview]
Message-ID: <20021112043650.GA8233@doctormoo> (raw)
This converts some variable settings to be subsituted in a more
autoconf-friendly manner. (They were previously echoed to a "prologue file"
to the Makefile.) It also simplifies one particular sed in a way which
eliminates two temporary files. (It was irritating me.)
I was originally concerned about setting the shell variable
enable_version_specific_runtime_libs to 'no' when it was blank, but I
found that it isn't used subsequent to this line in configure or configure.in,
except in ways which don't distinguish between '' and 'no'. So it's OK.
The change from ">>" to ">" down at the bottom is because only the *first*
sed should append to the "prolog file", which I haven't quite eliminated yet.
I'll tackle some more of its contents in a day or two.
Tested on i686-pc-linux-gnu; no change in generated Makefile except relocation
of variable settings by a few lines.
If approved, this will go into gcc 3.4bib, and will not hit src until
gcc 3.3 is released.
* configure: Substitute more variables in a more autoconf-friendly
way. Simplify slightly.
* Makefile.tpl: Make more variables substitutable in an
autoconf-friendly way.
* Makefile.in: Regenerate.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.111.4.6
diff -u -r1.111.4.6 Makefile.in
--- Makefile.in 9 Nov 2002 22:15:06 -0000 1.111.4.6
+++ Makefile.in 12 Nov 2002 04:26:54 -0000
@@ -26,6 +26,13 @@
NOTPARALLEL = .NOTPARALLEL
$(NOTPARALLEL):
+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@
+
srcdir = @srcdir@
prefix = @prefix@
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.5.2.4
diff -u -r1.5.2.4 Makefile.tpl
--- Makefile.tpl 9 Nov 2002 22:10:17 -0000 1.5.2.4
+++ Makefile.tpl 12 Nov 2002 04:26:56 -0000
@@ -29,6 +29,13 @@
NOTPARALLEL = .NOTPARALLEL
$(NOTPARALLEL):
+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@
+
srcdir = @srcdir@
prefix = @prefix@
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/configure,v
retrieving revision 1.46.6.3
diff -u -r1.46.6.3 configure
--- configure 10 Nov 2002 21:14:18 -0000 1.46.6.3
+++ configure 12 Nov 2002 04:26:58 -0000
@@ -1326,33 +1326,29 @@
echo site_makefile_frag = ${site_makefile_frag} >>${Makefile}
fi
- echo enable_shared = ${enable_shared} >> ${Makefile}
- echo enable_threads = ${enable_threads} >> ${Makefile}
+
# record if we want to rumtime library stuff installed in libsubdir.
+ # Blank means no.
if test -z "${enable_version_specific_runtime_libs}"; then
- echo enable_version_specific_runtime_libs = no >> ${Makefile}
- else
- echo enable_version_specific_runtime_libs = ${enable_version_specific_runtime_libs} >> ${Makefile}
+ enable_version_specific_runtime_libs=no
fi
- # Emit a macro which describes the file containing gcc's
- # version number.
- echo gcc_version_trigger = ${gcc_version_trigger} >> ${Makefile}
- # And emit a macro defining gcc's version number.
- echo gcc_version = ${gcc_version} >> ${Makefile}
+ # Real copy now in Makefile.tem
+ # Prologue in Makefile.
+
+ sed -e "s|@enable_shared@|${enable_shared}|" \
+ -e "s|@enable_threads@|${enable_threads}|" \
+ -e "s|@enable_version_specific_runtime_libs@|${enable_version_specific_runtime_libs}|" \
+ -e "s|@gcc_version_trigger@|${gcc_version_trigger}|" \
+ -e "s|@gcc_version@|${gcc_version}|" \
+ ./Makefile.tem >> ${Makefile}
+ mv -f ${Makefile} ./Makefile.tem
+ # Real copy now in Makefile.tem; no prologue.
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
- rm -f ./Makefile.tm2
- sedtemp=sed.$$
- cat >$sedtemp <<EOF
-s:@configdirs@:${configdirs}:
-EOF
- sed -f $sedtemp ./Makefile.tem > ./Makefile.tm2
- rm -f $sedtemp
- rm -f ./Makefile.tem
- mv ./Makefile.tm2 ./Makefile.tem
- sed -e "s|@prefix@|${prefix}|" \
+ sed -e "s|@configdirs@|${configdirs}|" \
+ -e "s|@prefix@|${prefix}|" \
-e "s|@exec_prefix@|${exec_prefix}|" \
-e "s|@bindir@|${bindir}|" \
-e "s|@sbindir@|${sbindir}|" \
@@ -1404,7 +1400,7 @@
-e "s:@DEFAULT_YACC@:${DEFAULT_YACC}:" \
-e "s:@DEFAULT_LEX@:${DEFAULT_LEX}:" \
-e "s:@DEFAULT_M4@:${DEFAULT_M4}:" \
- ./Makefile.tem >> ${Makefile}
+ ./Makefile.tem > ${Makefile}
sed -e "s:@GDB_TK@:${GDB_TK}:" ${Makefile} >${Makefile}.tem
mv -f ${Makefile}.tem ${Makefile}
next reply other threads:[~2002-11-12 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-11 20:37 Nathanael Nerode [this message]
2002-11-11 20:53 ` DJ Delorie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021112043650.GA8233@doctormoo \
--to=neroden@twcny.rr.com \
--cc=binutils@sources.redhat.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox