This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Toplevel Makefile.tpl cleanup 2/n part three


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 \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]