]> git.lizzy.rs Git - rust.git/commitdiff
Add snap-stageN targets.
authorGraydon Hoare <graydon@mozilla.com>
Thu, 12 May 2011 19:56:15 +0000 (12:56 -0700)
committerGraydon Hoare <graydon@mozilla.com>
Thu, 12 May 2011 20:08:57 +0000 (13:08 -0700)
mk/snap.mk
src/etc/make-snapshot.py
src/etc/snapshot.py

index 50fda3e366736aef0fb2de736b2954788caa1cb8..94caac60285717aabce41ae0e90b00f50293ba56 100644 (file)
@@ -1,3 +1,10 @@
 
-snap:
-       $(CFG_SRC_DIR)src/etc/make-snapshot.py
\ No newline at end of file
+snap-stage1: stage1/rustc stage1/glue.o stage1/$(CFG_STDLIB)
+       $(CFG_SRC_DIR)src/etc/make-snapshot.py stage1
+
+snap-stage2: stage2/rustc stage2/glue.o stage2/$(CFG_STDLIB)
+       $(CFG_SRC_DIR)src/etc/make-snapshot.py stage2
+
+snap-stage3: stage3/rustc stage3/glue.o stage3/$(CFG_STDLIB)
+       $(CFG_SRC_DIR)src/etc/make-snapshot.py stage3
+
index d02c09487ee51bbf49dc8092b97468569fc02498..d46500cdf1191858354ca4d8902354fbae3ff2cd 100755 (executable)
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 
-import snapshot
-print(snapshot.make_snapshot())
+import snapshot, sys
+print(snapshot.make_snapshot(sys.argv[1]))
index 8eaa37917fa8c9747e01b1c419d5395bbfa8dd13..35bbc3ef9f00d036e44f131aa779c90985ab3f2a 100644 (file)
@@ -102,7 +102,7 @@ def hash_file(x):
     return scrub(h.hexdigest())
 
 
-def make_snapshot():
+def make_snapshot(stage):
     kernel = get_kernel()
     platform = get_platform()
     rev = local_rev_short_sha()
@@ -112,7 +112,7 @@ def make_snapshot():
 
     tar = tarfile.open(file0, "w:bz2")
     for name in snapshot_files[kernel]:
-      tar.add(os.path.join("stage2", name),
+      tar.add(os.path.join(stage, name),
               "rust-stage0/" + name)
     tar.close()