aboutsummaryrefslogtreecommitdiffstats
path: root/build.sh
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-11-17 15:48:23 +0100
committerTharre <tharre3@gmail.com>2014-11-17 15:48:23 +0100
commitc27027cd2eeebfa63c084e746c7da46c952fb255 (patch)
treefee98369607e9adea91914fb60b05e53a20c12ce /build.sh
parentdf9bc5b9d048c7ecb96838123e39d5bc7c23aa18 (diff)
downloadredo-c27027cd2eeebfa63c084e746c7da46c952fb255.tar.gz
redo-c27027cd2eeebfa63c084e746c7da46c952fb255.tar.xz
redo-c27027cd2eeebfa63c084e746c7da46c952fb255.zip
Merge all redo-*.c files into redo.c.
The resulting redo binary behaves differently if called with each respective redo-* name, and is symlinked to the different command names. This should reduce the memory footprint of a redo build, as the OS only needs to keep one copy of the redo code in memory.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 8ef6e22..6a05260 100755
--- a/build.sh
+++ b/build.sh
@@ -6,15 +6,12 @@ $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/redo.o -c src/redo.c
-$CC $CFLAGS -o out/redo-ifchange.o -c src/redo-ifchange.c
-$CC $CFLAGS -o out/redo-ifcreate.o -c src/redo-ifcreate.c
-$CC $CFLAGS -o out/redo-always.o -c src/redo-always.c
$CC -o out/redo out/redo.o out/util.o out/build.o out/filepath.o out/sha1.o $LDFLAGS
-$CC -o out/redo-ifchange out/redo-ifchange.o out/util.o out/build.o out/filepath.o out/sha1.o $LDFLAGS
-$CC -o out/redo-ifcreate out/redo-ifcreate.o out/util.o out/build.o out/filepath.o out/sha1.o $LDFLAGS
-$CC -o out/redo-always out/redo-always.o out/util.o out/build.o out/filepath.o out/sha1.o $LDFLAGS
# TODO: just for convenience, should be removed as soon as redo can build itself
-sudo install out/redo out/redo-ifchange out/redo-ifcreate out/redo-always /usr/bin/
+sudo install out/redo /usr/bin
+sudo ln -sf /usr/bin/redo /usr/bin/redo-ifchange
+sudo ln -sf /usr/bin/redo /usr/bin/redo-ifcreate
+sudo ln -sf /usr/bin/redo /usr/bin/redo-always
echo "Finished compiling"