From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6307 invoked by alias); 12 Nov 2002 18:42:26 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6290 invoked from network); 12 Nov 2002 18:42:25 -0000 Received: from unknown (HELO mailout6-0.nyroc.rr.com) (24.92.226.125) by sources.redhat.com with SMTP; 12 Nov 2002 18:42:25 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout6-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gACIgCk06830; Tue, 12 Nov 2002 13:42:13 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18BfzA-00040M-00; Tue, 12 Nov 2002 13:42:04 -0500 Date: Tue, 12 Nov 2002 10:42:00 -0000 To: gcc-patches@gcc.gnu.org Cc: dj@redhat.com, binutils@sources.redhat.com, gdb-patches@sources.redhat.com Subject: toplevel patch: most autoconfiness of variables Message-ID: <20021112184204.GA15394@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-11/txt/msg00350.txt.bz2 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} <> ${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.