From 93569d9d32ae0c7a07da45be39a479e3a56e1907 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 16 Oct 2016 12:54:07 -0700 Subject: 3509 --- build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build b/build index 974866a3..e5164a78 100755 --- a/build +++ b/build @@ -18,7 +18,7 @@ export CFLAGS="$CFLAGS -Wall -Wextra -ftrapv -fno-strict-aliasing" # return 1 if $1 is older than _any_ of the remaining args older_than() { - target=$1 + local target=$1 shift if [ ! -e $target ] then @@ -26,6 +26,7 @@ older_than() { echo "updating $target" >&2 return 0 # success fi + local f for f in $* do if [ $f -nt $target ] @@ -99,7 +100,7 @@ older_than mu_bin mu.cc *_list cleave/cleave termbox/* && { } for f in mu_*.cc do - older_than `echo $f |sed 's/\.cc$/.o/'` $f && { + older_than `echo $f |sed 's/\.cc$/.o/'` $f header global_declarations_list && { $CXX $CFLAGS -c $f } done -- cgit 1.4.1-2-gfad0