]> git.lizzy.rs Git - rust.git/blobdiff - mk/snap.mk
librustc: Don't try to perform the magical
[rust.git] / mk / snap.mk
index dc9064417d4ec93def0cf8045f55dc5f6d0da579..a7eb71baf6bea82e4dbb2db9374581a06100cb81 100644 (file)
@@ -1,15 +1,28 @@
+# Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+# file at the top-level directory of this distribution and at
+# http://rust-lang.org/COPYRIGHT.
+#
+# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+# option. This file may not be copied, modified, or distributed
+# except according to those terms.
 
-snap-stage1: stage1/rustc$(X) stage1/lib/glue.o stage1/lib/$(CFG_RUNTIME) \
-       stage1/$(CFG_RUSTLLVM)
-       $(S)src/etc/make-snapshot.py stage1
+define DEF_SNAP_FOR_STAGE_H
+# $(1) stage
+# $(2) triple
 
-snap-stage2: stage2/rustc$(X) stage2/lib/glue.o stage2/lib/$(CFG_STDLIB) \
-       stage2/lib/libstd.rlib stage2/lib/$(CFG_RUNTIME) \
-       stage2/$(CFG_RUSTLLVM)
-       $(S)src/etc/make-snapshot.py stage2
+snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
+       $(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2)
 
-snap-stage3: stage3/rustc$(X) stage3/lib/glue.o stage3/lib/$(CFG_STDLIB) \
-       stage3/lib/libstd.rlib stage3/lib/$(CFG_RUNTIME) \
-       stage3/$(CFG_RUSTLLVM)
-       $(S)src/etc/make-snapshot.py stage3
+endef
 
+$(foreach host,$(CFG_HOST),                                            \
+ $(eval $(foreach stage,1 2 3,                                                         \
+  $(eval $(call DEF_SNAP_FOR_STAGE_H,$(stage),$(host))))))
+
+snap-stage1: snap-stage1-H-$(CFG_BUILD)
+
+snap-stage2: snap-stage2-H-$(CFG_BUILD)
+
+snap-stage3: snap-stage3-H-$(CFG_BUILD)