Mercurial > hg > qcc
comparison make/make.sh @ 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 |
comparison
equal
deleted
inserted
replaced
590:18ffc34ebf5d | 591:18192dd26583 |
---|---|
15 | 15 |
16 # Add a compiler define to the cc argument list, set to a string containing | 16 # Add a compiler define to the cc argument list, set to a string containing |
17 # the value of the environment variable of the same name. | 17 # the value of the environment variable of the same name. |
18 function DEF() | 18 function DEF() |
19 { | 19 { |
20 local DATA=$(eval "echo \$$1") | |
20 if [ -z "$DEBUG" ] | 21 if [ -z "$DEBUG" ] |
21 then | 22 then |
22 # Add a -DSYMBOL="STRING" argument. The shell eats some of the characters | 23 # Add a -DSYMBOL="STRING" argument. The shell eats some of the characters |
23 # but this gives the compiler the right arguments. | 24 # but this gives the compiler the right arguments. |
24 echo -D$1=\"\$$1\" | 25 echo -D$1=\""$DATA"\" |
25 else | 26 else |
26 # Add an extra layer of quotes so that even after the shell eats one, | 27 # Add an extra layer of quotes so that even after the shell eats one, |
27 # "echo" produces something that works if we cut and paste it. | 28 # "echo" produces something that works if we cut and paste it. |
28 echo -D$1=\\\"\$$1\\\" | 29 echo -D$1=\\\""$DATA"\\\" |
29 fi | 30 fi |
30 } | 31 } |
31 | 32 |
32 # Invoke the compiler with all the appropriate arguments | 33 # Invoke the compiler with all the appropriate arguments |
33 | 34 |
47 function show_verbose() | 48 function show_verbose() |
48 { | 49 { |
49 SHOWIT=echo | 50 SHOWIT=echo |
50 [ "$1" == "compile_tinycc" ] && SHOWIT="" | 51 [ "$1" == "compile_tinycc" ] && SHOWIT="" |
51 [ ! -z "$VERBOSE" ] && DEBUG=echo $SHOWIT "$@" | 52 [ ! -z "$VERBOSE" ] && DEBUG=echo $SHOWIT "$@" |
52 [ "$VERBOSE" != "debug" ] && "$@" || return 0 | 53 if [ "$VERBOSE" != "debug" ] |
54 then | |
55 "$@" | |
56 fi | |
53 } | 57 } |
54 | 58 |
55 function build() | 59 function build() |
56 { | 60 { |
57 # The path at which the new compiler should search for system libraries is, | 61 # The path at which the new compiler should search for system libraries is, |