diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | scripts/make.sh | 19 |
2 files changed, 17 insertions, 4 deletions
@@ -41,7 +41,7 @@ uninstall: scripts/install.sh --long --uninstall clean:: - rm -rf toybox toybox_unstripped testdir \ + rm -rf toybox toybox_unstripped testdir generated/build.sh \ .singleconfig .singleconfig.old generated/obj \ generated/Config.* generated/*.h generated/*.dat \ generated/instlist generated/mkflags generated/config2help diff --git a/scripts/make.sh b/scripts/make.sh index 34c1db51..049bc4d9 100755 --- a/scripts/make.sh +++ b/scripts/make.sh @@ -166,12 +166,25 @@ do_loudly() "$@" } -BUILD="${CROSS_COMPILE}${CC} $CFLAGS -I . $OPTIMIZE" -FILES="$(ls lib/*.c) main.c $TOYFILES" -LINK="$LDOPTIMIZE -o toybox_unstripped -Wl,--as-needed $(cat generated/optlibs.dat)" +BUILD="$(echo ${CROSS_COMPILE}${CC} $CFLAGS -I . $OPTIMIZE)" +FILES="$(echo lib/*.c main.c $TOYFILES)" +LINK="$(echo $LDOPTIMIZE -o toybox_unstripped -Wl,--as-needed $(cat generated/optlibs.dat))" # This is a parallel version of: do_loudly $BUILD $FILES $LINK || exit 1 +# Write a canned build line for use on crippled build machines. +( + echo "#!/bin/sh" + echo + echo "BUILD=\"$BUILD\"" + echo + echo "LINK=\"$LINK\"" + echo + echo "FILES=\"$FILES\"" + echo + echo '$BUILD $FILES $LINK' +) > generated/build.sh && chmod +x generated/build.sh || echo 1 + rm -rf generated/obj && mkdir -p generated/obj || exit 1 PENDING= for i in $FILES |