From 865a796081e9db596d3157233e2bb848d84a5d81 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 29 Nov 2011 11:53:43 -0800 Subject: [PATCH] fix snap --- mk/snap.mk | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/mk/snap.mk b/mk/snap.mk index 3271bb6ec01..9694c3ec706 100644 --- a/mk/snap.mk +++ b/mk/snap.mk @@ -1,9 +1,18 @@ +define DEF_SNAP_FOR_STAGE_H +# $(1) stage +# $(2) triple -snap-stage1: $(HSREQ1_H_$(CFG_HOST_TRIPLE)) - $(S)src/etc/make-snapshot.py stage1 $(CFG_HOST_TRIPLE) +snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2)) + $(S)src/etc/make-snapshot.py stage$(1) $(2) -snap-stage2: $(HSREQ2_H_$(CFG_HOST_TRIPLE)) - $(S)src/etc/make-snapshot.py stage2 $(CFG_HOST_TRIPLE) +endef -snap-stage3: $(HSREQ3_H_$(CFG_HOST_TRIPLE)) - $(S)src/etc/make-snapshot.py stage3 $(CFG_HOST_TRIPLE) +$(foreach host,$(CFG_TARGET_TRIPLES), \ + $(eval $(foreach stage,1 2 3, \ + $(eval $(call DEF_SNAP_FOR_STAGE_H,$(stage),$(host)))))) + +snap-stage1: snap-stage1-H-$(CFG_HOST_TRIPLE) + +snap-stage2: snap-stage2-H-$(CFG_HOST_TRIPLE) + +snap-stage3: snap-stage3-H-$(CFG_HOST_TRIPLE) \ No newline at end of file