diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | test/run.sh | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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 |