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


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 +]
 
 # --------------------------------------


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