summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-06-27 20:27:49 -0700
committerOri Bernstein <ori@eigenstate.org>2018-06-27 20:27:49 -0700
commit41c790aa25a1457849e76fd748f10329e74ccd2c (patch)
treebe834c78832fdbd99e1a24cbb3c544bef3e4cc05
parent42c82e8972ee89633b2f50fc807d0cec750dd12a (diff)
downloadmc-41c790aa25a1457849e76fd748f10329e74ccd2c.tar.gz
Make bootstrap more seamless.
Don't mix installed/new programs.
-rw-r--r--Makefile2
-rwxr-xr-xmbldwrap.sh10
2 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a2dfb8f..35b1adc 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ bench:
.PHONY: bootstrap
bootstrap: subdirs
./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh
- mbld/mbld
+ MBLD=mbld/mbld ./mbldwrap.sh
obj/mbld/mbld -o '' clean
.PHONY: genbootstrap
diff --git a/mbldwrap.sh b/mbldwrap.sh
index efe9552..4d8bfc6 100755
--- a/mbldwrap.sh
+++ b/mbldwrap.sh
@@ -13,10 +13,12 @@ else
export MYR_RT=`pwd`/rt/_myrrt.o
fi
-if [ -f obj/mbld/mbld ]; then
- MBLD=obj/mbld/mbld
-else
- MBLD=$(command -v mbld)
+if [ -z "$MBLD" ]; then
+ if [ -f obj/mbld/mbld ]; then
+ MBLD=obj/mbld/mbld
+ else
+ MBLD=$(command -v mbld)
+ fi
fi
if [ -z "$MBLD" ]; then