Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nathanael Nerode <neroden@twcny.rr.com>
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
Date: Tue, 04 Mar 2003 17:26:00 -0000	[thread overview]
Message-ID: <20030304172558.GA425@doctormoo> (raw)

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 \


                 reply	other threads:[~2003-03-04 17:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030304172558.GA425@doctormoo \
    --to=neroden@twcny.rr.com \
    --cc=aoliva@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox