commit 2a76b6943e874aea6c0ba03d89471f58cb44ba74
parent 58a3b356b4ba9bebee646e5e0c28d9ea0d2a9580
Author: kyle <kyle@getaddrinfo.net>
Date: Tue, 27 Oct 2015 20:14:06 -0600
Makefile: only recompile on make test
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -13,5 +13,8 @@ LDLIBS += \
instrument: instrument.cpp
+test: instrument
+ sh run_tests.sh
+
clean:
rm instrument
diff --git a/run_tests.sh b/run_tests.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-make || exit 1
# make sure we have a .c extension
temp_file=$(mktemp).c
@@ -21,7 +20,7 @@ for t in `ls tests/*/prog.c`; do
failed=1
fi
- # compile the instrumented file
+ # try to compile the instrumented file
if ! gcc -o /tmp/bin $temp_file; then
# /tmp/bin won't be created here
echo "$dirname/instrumented.c:$RED gcc compilation failed$RESET"