From a3865d8662ca5eeeac370486c44ecebc3473cb81 Mon Sep 17 00:00:00 2001 From: Maxwell Bernstein Date: Sun, 25 Oct 2020 11:31:58 -0700 Subject: Rename CFLAGS to CXXFLAGS This is a little misleading otherwise since this is an entirely C++ project. --- build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build b/build index f53f0619..a72c09d7 100755 --- a/build +++ b/build @@ -21,8 +21,8 @@ UNTIL_LAYER=${2:-zzz} test "$CXX" || export CXX=c++ test "$CC" || export CC=cc -test "$CFLAGS" || export CFLAGS="-g -O3 -std=c++98" # CI has an ancient version; don't expect recent dialects -export CFLAGS="$CFLAGS -Wall -Wextra -fno-strict-aliasing" +test "$CXXFLAGS" || export CXXFLAGS="-g -O3 -std=c++98" # CI has an ancient version; don't expect recent dialects +export CXXFLAGS="$CXXFLAGS -Wall -Wextra -fno-strict-aliasing" # return 1 if $1 is older than _any_ of the remaining args older_than() { @@ -73,7 +73,7 @@ noisy_cd() { } older_than tools/enumerate tools/enumerate.cc && { - $CXX $CFLAGS tools/enumerate.cc -o tools/enumerate + $CXX $CXXFLAGS tools/enumerate.cc -o tools/enumerate } older_than tools/tangle tools/tangle.cc && { @@ -81,7 +81,7 @@ older_than tools/tangle tools/tangle.cc && { grep -h "^[^ #].*) {" tangle.cc |sed 's/ {.*/;/' |update tangle.function_list grep -h "^[[:space:]]*void test_" tangle.cc |sed 's/^\s*void \(.*\)() {$/\1,/' |update tangle.test_list grep -h "^\s*void test_" tangle.cc |sed 's/^\s*void \(.*\)() {.*/"\1",/' |update tangle.test_name_list - $CXX $CFLAGS tangle.cc -o tangle + $CXX $CXXFLAGS tangle.cc -o tangle ./tangle test noisy_cd .. # no effect; just to show us returning to the parent directory } @@ -97,7 +97,7 @@ grep -h "^\s*void test_" bootstrap.cc |sed 's/^\s*void \(.*\)() {.*/\1,/' |upd grep -h "^\s*void test_" bootstrap.cc |sed 's/^\s*void \(.*\)() {.*/"\1",/' |update test_name_list older_than bootstrap_bin bootstrap.cc *_list && { - $CXX $CFLAGS bootstrap.cc -o bootstrap_bin + $CXX $CXXFLAGS bootstrap.cc -o bootstrap_bin echo } -- cgit 1.4.1-2-gfad0 From 5a23167d84367d851948c29006caaac3e19443dd Mon Sep 17 00:00:00 2001 From: Maxwell Bernstein Date: Sun, 25 Oct 2020 12:29:21 -0700 Subject: Remove CC --- build | 1 - 1 file changed, 1 deletion(-) diff --git a/build b/build index a72c09d7..073da720 100755 --- a/build +++ b/build @@ -20,7 +20,6 @@ UNTIL_LAYER=${2:-zzz} # risk: a file may unnecessarily update without changes, causing unnecessary work downstream test "$CXX" || export CXX=c++ -test "$CC" || export CC=cc test "$CXXFLAGS" || export CXXFLAGS="-g -O3 -std=c++98" # CI has an ancient version; don't expect recent dialects export CXXFLAGS="$CXXFLAGS -Wall -Wextra -fno-strict-aliasing" -- cgit 1.4.1-2-gfad0