From b39506329fbb46c5da343f20a5de7e328729da8f Mon Sep 17 00:00:00 2001 From: Tharre Date: Tue, 20 Dec 2016 13:18:59 +0100 Subject: Replace the build.sh script with bootstrap.sh --- bootstrap.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 bootstrap.sh (limited to 'bootstrap.sh') diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..5bf204d --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e +# Copyright (c) 2016 Tharre +# +# This software may be modified and distributed under the terms +# of the MIT license. See the LICENSE file for details. + +( +export BOOTSTRAP_BUILD=1 + +[ -f "./config.local" ] && . ./config.local + +. out/config.sh +$CC $CFLAGS -o out/util.o -c src/util.c +$CC $CFLAGS -o out/build.o -c src/build.c +$CC $CFLAGS -o out/filepath.o -c src/filepath.c +$CC $CFLAGS -o out/sha1.o -c src/sha1.c +$CC $CFLAGS -o out/DSV.o -c src/DSV.c +$CC $CFLAGS -o out/redo.o -c src/redo.c +$CC -o out/redo out/redo.o out/util.o out/build.o out/filepath.o out/sha1.o \ + out/DSV.o $LDFLAGS +) + +ln -sf redo out/redo-ifchange +ln -sf redo out/redo-ifcreate +ln -sf redo out/redo-always + +export PATH="$(pwd)/out:$PATH" + +redo + +echo "Finished bootstrapping." -- cgit v1.2.3-70-g09d2