Mercurial > hg > qcc
changeset 591:18192dd26583
Fix make/make.sh after that last checking (I broke it) and speed up selftest.sh
by avoiding some unnecessary cross compiling work.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 06 Apr 2008 17:30:40 -0500 |
parents | 18ffc34ebf5d |
children | 04ef85a39cf4 |
files | make/make.sh make/selftest.sh |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/make/make.sh Sun Apr 06 17:02:18 2008 -0500 +++ b/make/make.sh Sun Apr 06 17:30:40 2008 -0500 @@ -17,15 +17,16 @@ # the value of the environment variable of the same name. function DEF() { + local DATA=$(eval "echo \$$1") if [ -z "$DEBUG" ] then # Add a -DSYMBOL="STRING" argument. The shell eats some of the characters # but this gives the compiler the right arguments. - echo -D$1=\"\$$1\" + echo -D$1=\""$DATA"\" else # Add an extra layer of quotes so that even after the shell eats one, # "echo" produces something that works if we cut and paste it. - echo -D$1=\\\"\$$1\\\" + echo -D$1=\\\""$DATA"\\\" fi } @@ -49,7 +50,10 @@ SHOWIT=echo [ "$1" == "compile_tinycc" ] && SHOWIT="" [ ! -z "$VERBOSE" ] && DEBUG=echo $SHOWIT "$@" - [ "$VERBOSE" != "debug" ] && "$@" || return 0 + if [ "$VERBOSE" != "debug" ] + then + "$@" + fi } function build()
--- a/make/selftest.sh Sun Apr 06 17:02:18 2008 -0500 +++ b/make/selftest.sh Sun Apr 06 17:30:40 2008 -0500 @@ -14,11 +14,11 @@ mv $CCNAME test1cc && echo -e "\npass two: tinycc -o tinycc" && -CC=./test1cc make/make.sh $TARGET && +CC=./test1cc HOSTCC=./test1cc make/make.sh $TARGET && mv $CCNAME test2cc && echo -e "\npass three: tinycc -o tinycc -o tinycc" && -CC=./test2cc make/make.sh $TARGET && +CC=./test2cc HOSTCC=./test2cc make/make.sh $TARGET && echo -e "\nSanity check." && ./$CCNAME -E - </dev/null >/dev/null &&