]> git.lizzy.rs Git - rust.git/commitdiff
mk/stage0: complain instead of creating an empty file
authorCody P Schafer <dev@codyps.com>
Tue, 18 Nov 2014 19:53:39 +0000 (14:53 -0500)
committerCody P Schafer <dev@codyps.com>
Thu, 20 Nov 2014 21:00:12 +0000 (16:00 -0500)
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.

mk/stage0.mk

index e028bba73da1ec8adfae5989e19c45111dbf2fe1..460a4a7f445e36419bed34826710950850e9a0a1 100644 (file)
@@ -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: