about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCody P Schafer <dev@codyps.com>2014-11-18 14:53:39 -0500
committerCody P Schafer <dev@codyps.com>2014-11-20 16:00:12 -0500
commitaa58d534e5f7d4db64c1bddd5d6b446e110ca7f3 (patch)
tree173d9df0c45e2447515f57cdfc833243c6133e82
parent96c8f2b0c1846756e617f1f1fc1372c506e24248 (diff)
downloadrust-aa58d534e5f7d4db64c1bddd5d6b446e110ca7f3.tar.gz
rust-aa58d534e5f7d4db64c1bddd5d6b446e110ca7f3.zip
mk/stage0: complain instead of creating an empty file
If the expected rustc snapshot is not where we expect it to be,
complain and fail at that point rather than creating a empty rustc file
and continuing until we try to run it.
-rw-r--r--mk/stage0.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/mk/stage0.mk b/mk/stage0.mk
index e028bba73da..460a4a7f445 100644
--- a/mk/stage0.mk
+++ b/mk/stage0.mk
@@ -22,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: