This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: most autoconfiness of variables


This gets rid of the weird 'prologue' thing in configure entirely.  I think 
nearly everything is now substituted autoconf-style; I'll be poking through 
to see if I missed anything.  (I know about a couple already.)

package_makefile_frag and site_makefile_frag aren't used so aren't 
substituted.

The NO_EDIT prefix is lost; I'll eventually recover some form of it,
but I think it's not really that important at the moment.

Tested on i686-pc-linux-gnu.  Generated Makefile changes slightly, apart
from harmless line rearrangements:
host_makefile_frag is now set in all cases (to blank if empty); this is good
build_* values are now set in all cases; they aren't used, so this is harmless

If this is approved, it will go into gcc 3.4bib, and will hit src when 
that lands (shortly after 3.3 branches, hopefully).

	* configure: More autoconf-style substitutions.
	* Makefile.tpl: More autoconf-style substitutions.
	* Makefile.in: Regenerate.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.111.4.7
diff -u -r1.111.4.7 Makefile.in
--- Makefile.in	12 Nov 2002 18:10:38 -0000	1.111.4.7
+++ Makefile.in	12 Nov 2002 18:24:46 -0000
@@ -26,6 +26,25 @@
 NOTPARALLEL = .NOTPARALLEL
 $(NOTPARALLEL):
 
+VPATH=@srcdir@
+links=@configlinks@
+
+build_alias=@build_alias@
+build_cpu=@build_cpu@
+build_vendor=@build_vendor@
+build_os=@build_os@
+build_canonical=@build_cpu@-@build_vendor@-@build_os@
+host_alias=@host_alias@
+host_cpu=@host_cpu@
+host_vendor=@host_vendor@
+host_os=@host_os@
+host_canonical=@host_cpu@-@host_vendor@-@host_os@
+target_alias=@target_alias@
+target_cpu=@target_cpu@
+target_vendor=@target_vendor@
+target_os=@target_os@
+target_canonical=@target_cpu@-@target_vendor@-@target_os@
+
 enable_shared = @enable_shared@
 enable_threads = @enable_threads@
 enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
@@ -1824,6 +1843,9 @@
 	cd $(srcdir) && autogen Makefile.def
 
 # with the gnu make, this is done automatically.
+
+host_makefile_frag=@host_makefile_frag@
+target_makefile_frag=@target_makefile_frag@
 
 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
 	$(SHELL) ./config.status
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.5.2.5
diff -u -r1.5.2.5 Makefile.tpl
--- Makefile.tpl	12 Nov 2002 18:10:38 -0000	1.5.2.5
+++ Makefile.tpl	12 Nov 2002 18:24:47 -0000
@@ -29,6 +29,25 @@
 NOTPARALLEL = .NOTPARALLEL
 $(NOTPARALLEL):
 
+VPATH=@srcdir@
+links=@configlinks@
+
+build_alias=@build_alias@
+build_cpu=@build_cpu@
+build_vendor=@build_vendor@
+build_os=@build_os@
+build_canonical=@build_cpu@-@build_vendor@-@build_os@
+host_alias=@host_alias@
+host_cpu=@host_cpu@
+host_vendor=@host_vendor@
+host_os=@host_os@
+host_canonical=@host_cpu@-@host_vendor@-@host_os@
+target_alias=@target_alias@
+target_cpu=@target_cpu@
+target_vendor=@target_vendor@
+target_os=@target_os@
+target_canonical=@target_cpu@-@target_vendor@-@target_os@
+
 enable_shared = @enable_shared@
 enable_threads = @enable_threads@
 enable_version_specific_runtime_libs = @enable_version_specific_runtime_libs@
@@ -1499,6 +1518,9 @@
 	cd $(srcdir) && autogen Makefile.def
 
 # with the gnu make, this is done automatically.
+
+host_makefile_frag=@host_makefile_frag@
+target_makefile_frag=@target_makefile_frag@
 
 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger)
 	$(SHELL) ./config.status
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/configure,v
retrieving revision 1.46.6.4
diff -u -r1.46.6.4 configure
--- configure	12 Nov 2002 18:10:38 -0000	1.46.6.4
+++ configure	12 Nov 2002 18:24:49 -0000
@@ -1276,72 +1276,33 @@
   esac
   # real copy now in ./Makefile.tem
 
-  # prepend warning about editing, and a bunch of variables.
-  rm -f ${Makefile}
-  cat > ${Makefile} <<EOF
-# ${NO_EDIT}
-VPATH = ${srcdir}
-links = ${configlinks}
-host_alias = ${host_alias}
-host_cpu = ${host_cpu}
-host_vendor = ${host_vendor}
-host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_os}
-target_alias = ${target_alias}
-target_cpu = ${target_cpu}
-target_vendor = ${target_vendor}
-target_os = ${target_os}
-target_canonical = ${target_cpu}-${target_vendor}-${target_os}
-EOF
-  case "${build}" in
-    "") ;;
-    *)  cat >> ${Makefile} << EOF
-build_alias = ${build_alias}
-build_cpu = ${build_cpu}
-build_vendor = ${build_vendor}
-build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_os}
-EOF
-  esac
-
-  case "${package_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-    *)  echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-  esac
-
-  case "${target_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-    *)  echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-  esac
-
-  case "${host_makefile_frag}" in
-    "") ;;
-    /* | [A-Za-z]:[\\/]* ) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-    *)  echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-  esac
-
-  if [ "${site_makefile_frag}" != "" ] ; then
-    echo site_makefile_frag = ${site_makefile_frag} >>${Makefile}
-  fi 
-
-
-  # record if we want to rumtime library stuff installed in libsubdir.
+  # record if we want runtime library stuff installed in libsubdir.
   # Blank means no.
   if test -z "${enable_version_specific_runtime_libs}"; then
     enable_version_specific_runtime_libs=no
   fi
 
-  # Real copy now in Makefile.tem
-  # Prologue in Makefile.
-
-  sed -e "s|@enable_shared@|${enable_shared}|" \
+  sed -e "s|@configlinks@|${configlinks}|" \
+      -e "s|@build_alias@|${build_alias}|" \
+      -e "s|@build_cpu@|${build_cpu}|" \
+      -e "s|@build_vendor@|${build_vendor}|" \
+      -e "s|@build_os@|${build_os}|" \
+      -e "s|@host_alias@|${host_alias}|" \
+      -e "s|@host_cpu@|${host_cpu}|" \
+      -e "s|@host_vendor@|${host_vendor}|" \
+      -e "s|@host_os@|${host_os}|" \
+      -e "s|@target_alias@|${target_alias}|" \
+      -e "s|@target_cpu@|${target_cpu}|" \
+      -e "s|@target_vendor@|${target_vendor}|" \
+      -e "s|@target_os@|${target_os}|" \
+      -e "s|@target_makefile_frag@|${target_makefile_frag}|" \
+      -e "s|@host_makefile_frag@|${host_makefile_frag}|" \
+      -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}
+      ./Makefile.tem > ${Makefile}
   mv -f ${Makefile} ./Makefile.tem
   # Real copy now in Makefile.tem; no prologue.
 


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