commit - cd3d5ef3b48279768b13c823f03df0b541fc0070
commit + bf45a9adcbbe7a53758e93e765c8f8fab43aaa1c
blob - 868e1311f28e635d038f8783ee0acb948fc0376d
blob + 2c617fe7bcf5bf1f88074b75c404e55d33b5ceba
--- .gitignore
+++ .gitignore
*.core
mk
+tools
blob - /dev/null
blob + 8eb7ee0bd7f1b3b62b8f23a1e5cbe5761c31bb58 (mode 644)
--- /dev/null
+++ .env
+export PATH="$PWD/tools/bin:$PATH"
blob - 39330681ae90940072b25ba9101ae436d69c5502
blob + 157e99f059fcc6b58b1347adebb504310e30a1ff
--- MyMakefile
+++ MyMakefile
TOP != pwd
-CC = cc
-YACC = ${TOP}/cc/yacc/yacc
+CC ?= cc
+YACC ?= ${TOP}/tools/bin/yacc
all: make sys cc
rm -f *.core
distclean: clean
- rm -f mk
+ rm -rf tools
.c:
${CC} -o $@ $< ${CFLAGS} ${CPPFLAGS}
blob - 6397a3098941b11f158ce5e81d79da25a7f1db85
blob + a5f5c68898ebcc73ca616aebf96a0aff76c10faf
--- bootstrap
+++ bootstrap
-#!/bin/sh
+#!/bin/sh -e
[ -z "${CC}" ] && CC=cc
CFLAGS='-ansi -O0 -g -w'
-${CC} -o 'mk' 'make/make.c' ${CFLAGS}
+mkdir -p tools/bin
+
+${CC} -o 'tools/bin/mk' 'make/make.c' ${CFLAGS}
+
+./tools/bin/mk CC="${CC}" PREFIX="${PWD}/tools" cc/yacc/install
+ln -sf yacc tools/bin/xyacc
+
+echo 'Please run:'
+echo '$ . ./.env'