about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-03-31 08:00:28 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-03-31 08:00:28 -0700
commitdaa214478a7c09a996aae7141054d12a481bb392 (patch)
tree1d185c4c829ccc5f3d90766618a4c6fe39d58959
parent63513e9fdb400ee9319640ab6c3d03058a20df61 (diff)
downloadmu-daa214478a7c09a996aae7141054d12a481bb392.tar.gz
3807
Handle CFLAGS like "-g -O3 -pg" while compiling.
-rwxr-xr-xbuild6
1 files changed, 3 insertions, 3 deletions
diff --git a/build b/build
index abd8cded..309b53d5 100755
--- a/build
+++ b/build
@@ -19,9 +19,9 @@ UNTIL_LAYER=${2:-zzz}
 # otherwise you'll see spurious messages about files being updated
 # risk: a file may unnecessarily update without changes, causing unnecessary work downstream
 
-test $CXX || export CXX=c++
-test $CC || export CC=cc
-test $CFLAGS || export CFLAGS="-g -O3"
+test "$CXX" || export CXX=c++
+test "$CC" || export CC=cc
+test "$CFLAGS" || export CFLAGS="-g -O3"
 export CFLAGS="$CFLAGS -Wall -Wextra -ftrapv -fno-strict-aliasing"
 
 # return 1 if $1 is older than _any_ of the remaining args