]> git.lizzy.rs Git - rust.git/blobdiff - mk/stage0.mk
Auto merge of #28455 - nrc:span-bang, r=alexcrichton
[rust.git] / mk / stage0.mk
index 972cfecea718aa87de4a9cb1639d4c3a26ba235e..460a4a7f445e36419bed34826710950850e9a0a1 100644 (file)
@@ -3,12 +3,15 @@
 $(HBIN0_H_$(CFG_BUILD))/:
        mkdir -p $@
 
+# On windows these two are the same, so cause a redifinition warning
+ifneq ($(HBIN0_H_$(CFG_BUILD)),$(HLIB0_H_$(CFG_BUILD)))
 $(HLIB0_H_$(CFG_BUILD))/:
        mkdir -p $@
+endif
 
-$(SNAPSHOT_RUSTC_POST_CLEANUP):                                                \
-               $(S)src/snapshots.txt                                   \
-               $(S)src/etc/get-snapshot.py $(MKFILE_DEPS)              \
+$(SNAPSHOT_RUSTC_POST_CLEANUP): \
+               $(S)src/snapshots.txt \
+               $(S)src/etc/get-snapshot.py $(MKFILE_DEPS) \
                | $(HBIN0_H_$(CFG_BUILD))/
 
        @$(call E, fetch: $@)
@@ -19,7 +22,7 @@ ifdef CFG_ENABLE_LOCAL_RUST
 else
        $(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
 endif
-       $(Q)touch $@
+       $(Q)if [ -e "$@" ]; then touch "$@"; else echo "ERROR: snapshot $@ not found"; exit 1; fi
 
 # For other targets, let the host build the target:
 
@@ -44,5 +47,5 @@ endef
 
 # Use stage1 to build other architectures: then you don't have to wait
 # for stage2, but you get the latest updates to the compiler source.
-$(foreach t,$(NON_BUILD_HOST),                                                         \
+$(foreach t,$(NON_BUILD_HOST), \
  $(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))