Permalink
Browse files

Fix 'make all' to build all the way through stage2. Closes #3978

  • Loading branch information...
1 parent 2fd2a56 commit e4c0fad28f0c6c3cb7c147c08414edeb2224b5d5 @brson brson committed Nov 16, 2012
Showing with 14 additions and 3 deletions.
  1. +14 −3 Makefile.in
View
@@ -351,13 +351,13 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
-# Prerequisites for a working stageN compiler and libraries
+# Prerequisites for a working stageN compiler and libraries, for a specific target
SREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB)
-# Prerequisites for a working stageN compiler and libraries
+# Prerequisites for a working stageN compiler and libraries, for a specific target
CSREQ$(1)_T_$(2)_H_$(3) = \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(HBIN$(1)_H_$(3))/fuzzer$$(X) \
@@ -472,11 +472,22 @@ CFG_INFO := $(info cfg: *** compiler is in snapshot transition ***)
CFG_INFO := $(info cfg: *** stage2 and later will not be built ***)
CFG_INFO := $(info cfg:)
+#XXX This is surely busted
all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs
else
-all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs
+define ALL_TARGET_N
+all-target-$(1)-host-$(2): $$(CSREQ2_T_$(1)_H_$(2))
+endef
+
+$(foreach target,$(CFG_TARGET_TRIPLES), \
+ $(eval $(call ALL_TARGET_N,$(target),$(CFG_HOST_TRIPLE))))
+
+ALL_TARGET_RULES = $(foreach target,$(CFG_TARGET_TRIPLES), \
+ all-target-$(target)-host-$(CFG_HOST_TRIPLE))
+
+all: $(ALL_TARGET_RULES) $(GENERATED) docs
endif

0 comments on commit e4c0fad

Please sign in to comment.