summaryrefslogtreecommitdiffstats
path: root/Makefile.tpl
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2004-09-01 07:48:07 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2004-09-01 07:48:07 +0000
commit99df82b9b41385cbe0e0d58f51417b05212234b2 (patch)
treebdf672c89be410a2e372debf80f60d246ce526fc /Makefile.tpl
parentf0720ce7cbd5b714f4654535b8dc647cfd1f3ffd (diff)
downloadcygnal-99df82b9b41385cbe0e0d58f51417b05212234b2.tar.gz
cygnal-99df82b9b41385cbe0e0d58f51417b05212234b2.tar.bz2
cygnal-99df82b9b41385cbe0e0d58f51417b05212234b2.zip
2004-09-01 Paolo Bonzini <bonzini@gnu.org>
* Makefile.tpl (sorry): Remove. (clean-stage[+id+], clean-stage[+id+]-module): New targets. (cleanstrap targets): Depend on distclean, not distclean-stage1. (do-clean): Clean per-stage directories too. (do-distclean): Run distclean-stage1 too. (.NOTPARALLEL): Enable during toplevel bootstrap. (stage[+id+]-bubble): Enable parallel execution during the recursive invocation. * Makefile.in: Regenerate. Sync from gcc (moving the Makefile.in change to Makefile.tpl): 2004-08-31 Robert Bowdidge <bowdidge@apple.com> * Makefile.in: Move BOOT_CFLAGS above host makefile fragment include. * configure.in: add test for powerpc-*-darwin* to specify makefile frag * configure: regenerate * config/mh-ppc-darwin: create file, override BOOT_CFLAGS for -mdynamic-no-pic
Diffstat (limited to 'Makefile.tpl')
-rw-r--r--Makefile.tpl52
1 files changed, 36 insertions, 16 deletions
diff --git a/Makefile.tpl b/Makefile.tpl
index fed682475..8dbf237f1 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -248,6 +248,10 @@ CXX_FOR_BUILD = $(CXX)
BUILD_PREFIX = @BUILD_PREFIX@
BUILD_PREFIX_1 = @BUILD_PREFIX_1@
+# Flags to pass to stage2 and later makes. They are defined
+# here so that they can be overridden by Makefile fragments.
+BOOT_CFLAGS= -g -O2
+
CONFIGURED_BISON = @CONFIGURED_BISON@
BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
@@ -481,14 +485,6 @@ PICFLAG_FOR_TARGET =
# Miscellaneous targets and flag lists
# ------------------------------------
-@if gcc-bootstrap
-# Let's leave this as the first rule in the file until toplevel
-# bootstrap is fleshed out completely.
-sorry:
- @echo Toplevel bootstrap temporarily out of commission.
- @echo Please reconfigure without --enable-bootstrap
-@endif gcc-bootstrap
-
# The first rule in the file had better be this one. Don't put any above it.
# This lives here to allow makefile fragments to contain dependencies.
@default_target@:
@@ -1338,7 +1334,9 @@ stage:
# (both in a combined tree, or separately). This however requires some
# change to the gcc driver, again in order to avoid comparison failures.
-# Bugs: This is almost certainly not parallel-make safe.
+# Bugs: This is crippled when doing parallel make, the `make all-host'
+# and `make all-target' phases can be parallelized.
+
# 'touch' doesn't work right on some platforms.
STAMP = echo timestamp >
@@ -1356,7 +1354,6 @@ STAGE1_LANGUAGES=@stage1_languages@
objext = .o
# Flags to pass to stage2 and later makes.
-BOOT_CFLAGS= -g -O2
POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
STAGE_PREFIX=$$r/stage[+prev+]-gcc/ \
@@ -1402,20 +1399,27 @@ stage[+id+]-bubble:: [+ IF prev +]stage[+prev+]-bubble[+ ENDIF +][+IF lean +]
IF prev +]|| test -f stage[+prev+]-lean [+ ENDIF prev +] ; then \
echo Skipping rebuild of stage[+id+] ; \
else \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage[+id+]; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stage[+id+]; \
fi
-.PHONY: all-stage[+id+]
+.PHONY: all-stage[+id+] clean-stage[+id+]
all-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\
maybe-all-stage[+id+]-[+module+][+
ENDIF bootstrap+] [+ ENDFOR host_modules +]
+do-clean: clean-stage[+id+]
+clean-stage[+id+]: [+ FOR host_modules +][+ IF bootstrap +]\
+ maybe-clean-stage[+id+]-[+module+][+
+ENDIF bootstrap+] [+ ENDFOR host_modules +]
+
[+ FOR host_modules +][+ IF bootstrap +]
.PHONY: configure-stage[+id+]-[+module+] maybe-configure-stage[+id+]-[+module+]
.PHONY: all-stage[+id+]-[+module+] maybe-all-stage[+id+]-[+module+]
+.PHONY: clean-stage[+id+]-[+module+] maybe-clean-stage[+id+]-[+module+]
maybe-configure-stage[+id+]-[+module+]:
maybe-all-stage[+id+]-[+module+]:
+maybe-clean-stage[+id+]-[+module+]:
@if [+module+]-bootstrap
maybe-configure-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+]
@@ -1454,7 +1458,18 @@ all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+]
$(MAKE) $(FLAGS_TO_PASS) [+ IF prev +] \
$(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
[+stage_make_flags+] [+extra_make_flags+]
+
+maybe-clean-stage[+id+]-[+module+]: clean-stage[+id+]-[+module+]
+clean-stage[+id+]-[+module+]:
+ @[ -f [+module+]/Makefile ] || [ -f stage[+id+]-[+module+]/Makefile ] \
+ || exit 0 ; \
+ [ -f [+module+]/Makefile ] || $(MAKE) stage[+id+]-start ; \
+ cd [+module+] && \
+ $(MAKE) $(FLAGS_TO_PASS) [+ IF prev +] \
+ $(POSTSTAGE1_FLAGS_TO_PASS) [+ ENDIF prev +] \
+ [+stage_make_flags+] [+extra_make_flags+] clean
@endif [+module+]-bootstrap
+
[+ ENDIF bootstrap +][+ ENDFOR host_modules +]
# FIXME: Will not need to be conditional when toplevel bootstrap is the
@@ -1494,10 +1509,9 @@ all-stage[+id+]-[+module+]: configure-stage[+id+]-[+module+]
[+bootstrap-target+]: stage[+id+]-bubble [+compare-target+] all
[+ ENDIF bootstrap-target +]
-.PHONY: distclean-stage[+id+]
-
-# Rules to wipe a stage and all the following ones, used for cleanstrap
+# Rules to wipe a stage and all the following ones, also used for cleanstrap
[+ IF prev +]distclean-stage[+prev+]:: distclean-stage[+id+] [+ ENDIF prev +]
+.PHONY: distclean-stage[+id+]
distclean-stage[+id+]::
[ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
rm -rf stage[+id+]-* [+
@@ -1505,7 +1519,7 @@ distclean-stage[+id+]::
[+ IF cleanstrap-target +]
.PHONY: [+cleanstrap-target+]
-[+cleanstrap-target+]: distclean-stage1 [+bootstrap-target+]
+[+cleanstrap-target+]: distclean [+bootstrap-target+]
[+ ENDIF cleanstrap-target +]
@endif gcc-bootstrap
@@ -1541,6 +1555,12 @@ profiledbootstrap:
$(MAKE) stagefeedback-bubble stagefeedback-end
@endif gcc-bootstrap
+@if gcc-bootstrap
+NOTPARALLEL = .NOTPARALLEL
+$(NOTPARALLEL):
+do-distclean: distclean-stage1
+@endif gcc-bootstrap
+
# --------------------------------------
# Dependencies between different modules
# --------------------------------------