Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Toplevel Makefile.tpl cleanup 2/n part three
@ 2003-03-04 17:26 Nathanael Nerode
  0 siblings, 0 replies; only message in thread
From: Nathanael Nerode @ 2003-03-04 17:26 UTC (permalink / raw)
  To: gcc-patches, binutils, gdb-patches, aoliva

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 \


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-04 17:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-04 17:26 Toplevel Makefile.tpl cleanup 2/n part three Nathanael Nerode

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox