shithub: mc

Download patch

ref: 41c790aa25a1457849e76fd748f10329e74ccd2c
parent: 42c82e8972ee89633b2f50fc807d0cec750dd12a
author: Ori Bernstein <[email protected]>
date: Wed Jun 27 16:27:49 EDT 2018

Make bootstrap more seamless.

	Don't mix installed/new programs.

--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@
 .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
--- a/mbldwrap.sh
+++ b/mbldwrap.sh
@@ -13,10 +13,12 @@
 	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