From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26052 invoked by alias); 4 Mar 2003 17:26:11 -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 26032 invoked from network); 4 Mar 2003 17:26:10 -0000 Received: from unknown (HELO ms-smtp-01.nyroc.rr.com) (24.92.226.148) by 172.16.49.205 with SMTP; 4 Mar 2003 17:26:10 -0000 Received: from doctormoo (syr-24-24-17-145.twcny.rr.com [24.24.17.145]) by ms-smtp-01.nyroc.rr.com (8.12.5/8.12.2) with ESMTP id h24HQ8b1022969; Tue, 4 Mar 2003 12:26:08 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18qGAw-00006u-00; Tue, 04 Mar 2003 12:25:58 -0500 Date: Tue, 04 Mar 2003 17:26:00 -0000 To: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com, aoliva@redhat.com Subject: Toplevel Makefile.tpl cleanup 2/n part three Message-ID: <20030304172558.GA425@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-03/txt/msg00099.txt.bz2 This collapses the 'if' into the preceding 'case'. * Makefile.tpl: Simplify logic. * Makefile.in: Regenerate. --- Makefile.tpl.old 2003-03-04 12:17:00.000000000 -0500 +++ Makefile.tpl 2003-03-04 12:24:25.000000000 -0500 @@ -838,30 +838,30 @@ echo Configuring in $(BUILD_SUBDIR)/[+module+]; \ cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \ case $(srcdir) in \ + \.) \ + if [ "$(BUILD_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ + if [ -f Makefile ]; then \ + $(MAKE) distclean || exit 1; \ + fi; \ + else \ + exit 1; \ + fi; \ + fi; \ + srcdiroption="--srcdir=." ; \ + libsrcdir="." ;; \ /* | [A-Za-z]:[\\/]*) \ - topdir=$(srcdir) ;; \ + topdir=$(srcdir) ; \ + srcdiroption="--srcdir=$${topdir}/[+module+]" ; \ + libsrcdir="$$s/[+module+]" ;; \ *) \ case "$(BUILD_SUBDIR)" in \ .) topdir="../$(srcdir)" ;; \ *) topdir="../../$(srcdir)" ;; \ - esac ;; \ + esac ; \ + srcdiroption="--srcdir=$${topdir}/[+module+]" ; \ + libsrcdir="$$s/[+module+]" ;; \ esac; \ - if [ "$(srcdir)" = "." ] ; then \ - if [ "$(BUILD_SUBDIR)" != "." ] ; then \ - if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ - if [ -f Makefile ]; then \ - $(MAKE) distclean || exit 1; \ - fi; \ - else \ - exit 1; \ - fi; \ - 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} \ @@ -1020,29 +1020,32 @@ echo Configuring in $(TARGET_SUBDIR)/[+module+]; \ cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \ case $(srcdir) in \ + \.) \ + if [ "$(TARGET_SUBDIR)" != "." ] ; then \ + if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ + if [ -f Makefile ]; then \ + $(MAKE) distclean || exit 1; \ + fi; \ + else \ + exit 1; \ + fi; \ + fi; \ + srcdiroption="--srcdir=." ; \ + libsrcdir="." ;; \ /* | [A-Za-z]:[\\/]*) \ - topdir=$(srcdir) ;; \ + topdir=$(srcdir) ; \ + srcdiroption="--srcdir=$${topdir}/[+module+]" ; \ + libsrcdir="$$s/[+module+]" ;; \ *) \ case "$(TARGET_SUBDIR)" in \ .) topdir="../$(srcdir)" ;; \ *) topdir="../../$(srcdir)" ;; \ - esac ;; \ + esac ; \ + srcdiroption="--srcdir=$${topdir}/[+module+]" ; \ + libsrcdir="$$s/[+module+]" ;; \ esac; \ if [ "$(srcdir)" = "." ] ; then \ - if [ "$(TARGET_SUBDIR)" != "." ] ; then \ - if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \ - if [ -f Makefile ]; then \ - $(MAKE) distclean || exit 1; \ - fi; \ - else \ - exit 1; \ - fi; \ - 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 \