aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xtest/run.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5af40ba..be28de4 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ build/%.o: %.c common.h
$(CC) $(CFLAGS) -MMD -MP -MT $@ -MF build/$*.d -c -o $@ $<
clean:
- $(RM) -r build// $(OUT) *.o a.out
+ $(RM) -r build/ test/build/ $(OUT) *.o a.out
.PHONY: clean
diff --git a/test/run.sh b/test/run.sh
index dd8f431..5e0bc0f 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -14,10 +14,10 @@ run() {
f="$(basename "$1")"
expected=build/"$(echo "$f" | sed -s 's/\.c$/.expected/')"
echo ---- $f ---- >> log.txt
+ mkdir -p build/
args=$(awk '/\/\* ARGS:.*$/ {ORS=" ";for (i=3;i<NF;++i)print $i;ORS="\n";print""}' "$f")
awk '/\/\* EXPECT:$/ {x=k=any=1} x && /\*\// {x=0} x {if (!k)print $0;k=0} END{if(x||!any)exit 1;}' "$f" > "$expected"
if [ $? == 0 ]; then
- mkdir -p build/
obj=build/"$(echo "$f" | sed -s 's/\.c$/.o/')"
exe=build/"$(echo "$f" | sed -s 's/\.c$//')"
if ! ( x $ANTCC "$f" -c -o "$obj" && x $ANTCC "$obj" -o "$exe" ); then