public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* top level patch: even MORE autoconfiness
@ 2002-11-11 23:43 Nathanael Nerode
  2002-11-12  5:40 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-11-11 23:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: dj

DJ quoth:
>Do we still need two seds?  Why can't we add those exprs to the second
>sed?

I was, at the time, worried about extending that sed command to absurd 
lengths.  You're probably right, though; I can put in a patch which puts 
it all in one sed if you prefer.  The whole mess will go away when the 
actual autoconfiscation happens anyway.

--Nathanael

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: top level patch: even MORE autoconfiness
  2002-11-11 23:43 top level patch: even MORE autoconfiness Nathanael Nerode
@ 2002-11-12  5:40 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2002-11-12  5:40 UTC (permalink / raw)
  To: neroden; +Cc: gcc-patches


> I was, at the time, worried about extending that sed command to
> absurd lengths.

Good point.  Ok, commit the patch you posted.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: top level patch: even MORE autoconfiness
  2002-11-11 20:37 Nathanael Nerode
@ 2002-11-11 20:53 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2002-11-11 20:53 UTC (permalink / raw)
  To: neroden; +Cc: gcc-patches, binutils, gdb-patches


Do we still need two seds?  Why can't we add those exprs to the second
sed?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* top level patch: even MORE autoconfiness
@ 2002-11-11 20:37 Nathanael Nerode
  2002-11-11 20:53 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Nathanael Nerode @ 2002-11-11 20:37 UTC (permalink / raw)
  To: gcc-patches; +Cc: dj, binutils, gdb-patches

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}
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-11-12 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11 23:43 top level patch: even MORE autoconfiness Nathanael Nerode
2002-11-12  5:40 ` DJ Delorie
  -- strict thread matches above, loose matches on Subject: below --
2002-11-11 20:37 Nathanael Nerode
2002-11-11 20:53 ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).