From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12691 invoked by alias); 26 Feb 2003 19:16:13 -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 12677 invoked from network); 26 Feb 2003 19:16:12 -0000 Received: from unknown (HELO ms-smtp-03.nyroc.rr.com) (24.92.226.153) by 172.16.49.205 with SMTP; 26 Feb 2003 19:16:12 -0000 Received: from doctormoo (syr-24-24-17-145.twcny.rr.com [24.24.17.145]) by ms-smtp-03.nyroc.rr.com (8.12.5/8.12.2) with ESMTP id h1QJGBbF019501; Wed, 26 Feb 2003 14:16:11 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18o726-0000pe-00; Wed, 26 Feb 2003 14:15:58 -0500 Date: Wed, 26 Feb 2003 19:16:00 -0000 To: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com, binutils@sources.redhat.com, dj@redhat.com Subject: Toplevel Makefile.tpl cleanup 2/n Message-ID: <20030226191558.GA3187@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: 2003-02/txt/msg00728.txt.bz2 Cleanup. Shouldn't change anything. Tested on i686-pc-linux-gnu by poking the target directly (since it otherwise only invokes when cross-building, which is quite hard to test). Zack suggested that I be made an official maintainer for the top level configury., so I don't have to get explicit approval for each of these. Any chance of that?... * Makefile.tpl: Reindent and simplify logic for *-build-*. * Makefile.in: Regenerate. --- Makefile.tpl.old 2003-02-25 17:15:04.000000000 -0500 +++ Makefile.tpl 2003-02-26 14:08:44.000000000 -0500 @@ -818,70 +818,58 @@ maybe-configure-build-[+module+]: configure-build-[+module+]: @test ! -f $(BUILD_SUBDIR)/[+module+]/Makefile || exit 0; \ - [ -d $(BUILD_SUBDIR)/[+module+] ] || \ - mkdir $(BUILD_SUBDIR)/[+module+];\ - r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - AR="$(AR_FOR_BUILD)"; export AR; \ - AS="$(AS_FOR_BUILD)"; export AS; \ - CC="$(CC_FOR_BUILD)"; export CC; \ - CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ - CXX="$(CXX_FOR_BUILD)"; export CXX; \ - CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ - GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ - DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ - LD="$(LD_FOR_BUILD)"; export LD; \ - LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ - NM="$(NM_FOR_BUILD)"; export NM; \ - RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ - WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ - echo Configuring in $(BUILD_SUBDIR)/[+module+]; \ - cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) \ - topdir=$(srcdir) ;; \ - *) \ - case "$(BUILD_SUBDIR)" in \ - .) topdir="../$(srcdir)" ;; \ - *) topdir="../../$(srcdir)" ;; \ - esac ;; \ - esac; \ - if [ "$(srcdir)" = "." ] ; then \ - if [ "$(BUILD_SUBDIR)" != "." ] ; then \ - if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ - if [ -f Makefile ]; then \ - if $(MAKE) distclean; then \ - true; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - else \ - exit 1; \ - fi; \ - else \ - true; \ - fi; \ - srcdiroption="--srcdir=."; \ - libsrcdir="."; \ - else \ - srcdiroption="--srcdir=$${topdir}/[+module+]"; \ - libsrcdir="$$s/[+module+]"; \ - fi; \ - rm -f no-such-file || : ; \ - CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ - $(BUILD_CONFIGARGS) $${srcdiroption} \ - --with-build-subdir="$(BUILD_SUBDIR)" \ - || exit 1 + [ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\ + r=`${PWD}`; export r; \ + s=`cd $(srcdir); ${PWD}`; export s; \ + AR="$(AR_FOR_BUILD)"; export AR; \ + AS="$(AS_FOR_BUILD)"; export AS; \ + CC="$(CC_FOR_BUILD)"; export CC; \ + CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ + CXX="$(CXX_FOR_BUILD)"; export CXX; \ + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ + GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \ + DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ + LD="$(LD_FOR_BUILD)"; export LD; \ + LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ + NM="$(NM_FOR_BUILD)"; export NM; \ + RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \ + WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \ + echo Configuring in $(BUILD_SUBDIR)/[+module+]; \ + cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \ + case $(srcdir) in \ + \.) \ + case "$(BUILD_SUBDIR)" in \ + \.) ;; \ + *) \ + $(SHELL) $$s/symlink-tree ../../$(srcdir)/[+module+] "no-such-file" || exit 1; \ + if [ -f Makefile ]; then \ + $(MAKE) distclean || exit 1; \ + fi ;; \ + esac ; \ + srcdiroption="--srcdir=." ; \ + libsrcdir="." ;; \ + /* | [A-Za-z]:[\\/]*) \ + srcdiroption="--srcdir=$(srcdir)/[+module+]"; \ + libsrcdir="$$s/[+module+]";; \ + *) \ + case "$(BUILD_SUBDIR)" in \ + \.) srcdiroption="--srcdir=../$(srcdir)/[+module+]" ;; \ + *) srcdiroption="--srcdir=../../$(srcdir)/[+module+]" ;; \ + esac ; \ + libsrcdir="$$s/[+module+]" ;; \ + esac; \ + rm -f no-such-file || : ; \ + CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ + $(BUILD_CONFIGARGS) $${srcdiroption} \ + --with-build-subdir="$(BUILD_SUBDIR)" \ + || exit 1 .PHONY: all-build-[+module+] maybe-all-build-[+module+] maybe-all-build-[+module+]: all-build-[+module+]: configure-build-[+module+] @r=`${PWD}`; export r; \ - s=`cd $(srcdir); ${PWD}`; export s; \ - (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all) + s=`cd $(srcdir); ${PWD}`; export s; \ + cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all [+ ENDFOR build_modules +] # --------------------------------------