shithub: mc

Download patch

ref: c89a9ad95390793148fd416451ae1d8ebf1d6ae1
parent: 66e8d816c8cdb09bb175c0145202f100c4b4284c
author: Ori Bernstein <[email protected]>
date: Thu Oct 5 14:10:43 EDT 2017

make the bootstrapping step explicit.

--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,10 @@
 
 .PHONY: bootstrap
 bootstrap: buildmyr
+	./mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh
+
+.PHONY: genbootstrap
+genbootstrap: buildmyr
 	./genbootstrap.sh
 
 buildmyr: subdirs
--- a/mbldwrap.sh
+++ b/mbldwrap.sh
@@ -12,18 +12,17 @@
 	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
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.sh
@@ -116,7 +116,7 @@
 	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
--- a/mkfile
+++ b/mkfile
@@ -38,8 +38,11 @@
 	}
 	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)@{