summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xmbldwrap.sh15
-rwxr-xr-xmk/bootstrap/bootstrap+Linux-x86_64.sh2
-rw-r--r--mkfile5
4 files changed, 16 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 00829ed..c48939c 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,10 @@ bench:
.PHONY: bootstrap
bootstrap: buildmyr
+ ./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh
+
+.PHONY: genbootstrap
+genbootstrap: buildmyr
./genbootstrap.sh
buildmyr: subdirs
diff --git a/mbldwrap.sh b/mbldwrap.sh
index c1e4655..0983dd6 100755
--- a/mbldwrap.sh
+++ b/mbldwrap.sh
@@ -12,18 +12,17 @@ else
export MYR_MC=6m
export MYR_RT=`pwd`/rt/_myrrt.o
fi
-BOOT="./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh"
-MBLD=mbld
if [ -f obj/mbld/mbld ]; then
MBLD=obj/mbld/mbld
elif [ -f mbld/mbld ]; then
MBLD=mbld/mbld
+else
+ MBLD=`which mbld`
fi
-bootstrap() {
- ($BOOT && mbld/mbld $@) || \
- (echo "Unable to run mbld $@; have you build successfully"; exit 1)
-}
-
-$MBLD $@ || bootstrap $@
+if [ -z "$MBLD" ]; then
+ echo 'could not find mbld: did you run "make bootstrap"?'
+else
+ $MBLD $@
+fi
diff --git a/mk/bootstrap/bootstrap+Linux-x86_64.sh b/mk/bootstrap/bootstrap+Linux-x86_64.sh
index 9213103..270baa7 100755
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.sh
@@ -116,7 +116,7 @@ set -x
ar -rcs lib/bio/libbio.a lib/bio/puti.o lib/bio/geti.o lib/bio/mem.o lib/bio/bio.o lib/bio/iter.o
$pwd/muse/muse -o lib/bio/libbio.use -p bio lib/bio/puti.use lib/bio/geti.use lib/bio/mem.use lib/bio/bio.use lib/bio/iter.use
$pwd/6/6m -I lib/sys -I lib/std lib/thread/spawn+linux.myr
- $pwd/6/6m -I lib/sys -I lib/std lib/thread/ncpu.myr
+ $pwd/6/6m -I lib/sys -I lib/std lib/thread/ncpu+linux.myr
$pwd/6/6m -I lib/sys -I lib/std lib/thread/common.myr
$pwd/6/6m -I lib/sys -I lib/std lib/thread/atomic.myr
$pwd/6/6m -I lib/sys -I lib/std lib/thread/mutex+linux.myr
diff --git a/mkfile b/mkfile
index 491f77a..7352951 100644
--- a/mkfile
+++ b/mkfile
@@ -38,9 +38,12 @@ install:V: $SUB config.h
}
ape/psh mbldwrap.sh install
-bootstrap:V:
+genbootstrap:V:
ape/psh genbootstrap.sh
+bootstrap:V:
+ ape/psh mk/bootstrap/bootstrap+Plan9-amd64.sh
+
uninstall:V: $SUB config.h
for(dir in $SUB)@{
cd $dir