This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
(toplevel patch) Real make targets for configure-build-*
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org, gdb-patches at sources dot redhat dot com, binutils at sources dot redhat dot com, dj at redhat dot com
- Date: Tue, 3 Dec 2002 11:14:07 -0500
- Subject: (toplevel patch) Real make targets for configure-build-*
Use the real target $(BUILD_SUBDIR)/*/Makefile for the target
configure-build-*. Enables lots of simplification. Tested thoroughly
on i686-pc-linux-gnu. Corresponding patch for configure-target-* coming
soon. Reformatting is not done here; I'll do a reindentation pass after I
delete most of the ifs I'm going to delete.
* Makefile.tpl: Realize configure-build-* targets.
* Makefile.in: Regenerate.
--- Makefile.tpl.base 2002-12-03 11:00:50.000000000 -0500
+++ Makefile.tpl 2002-12-03 11:10:17.000000000 -0500
@@ -795,14 +795,9 @@
[+ FOR build_modules +]
.PHONY: configure-build-[+module+] maybe-configure-build-[+module+]
maybe-configure-build-[+module+]:
-configure-build-[+module+]:
- @if [ ! -d $(BUILD_SUBDIR) ]; then \
- true; \
- elif [ -f $(BUILD_SUBDIR)/[+module+]/Makefile ] ; then \
- true; \
- elif echo " $(BUILD_CONFIGDIRS) " | grep " [+module+] " >/dev/null 2>&1; then \
- if [ -d $(srcdir)/[+module+] ]; then \
- [ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
+configure-build-[+module+]: $(BUILD_SUBDIR)/[+module+]/Makefile
+$(BUILD_SUBDIR)/[+module+]/Makefile: config.status
+ @[ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
AR="$(AR_FOR_BUILD)"; export AR; \
@@ -857,24 +852,14 @@
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) $${srcdiroption} \
--with-build-subdir="$(BUILD_SUBDIR)" \
- || exit 1; \
- else \
- true; \
- fi; \
- else \
- true; \
- fi
+ || exit 1
.PHONY: all-build-[+module+] maybe-all-build-[+module+]
maybe-all-build-[+module+]:
all-build-[+module+]: configure-build-[+module+]
- @if [ -f ./[+module+]/Makefile ] ; then \
- r=`${PWD}`; export r; \
+ @r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
- (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all); \
- else \
- true; \
- fi
+ (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all)
[+ ENDFOR build_modules +]
# --------------------------------------