fix percent printing
[calc.git] / makefile
index 090167546568a9e47e12ff1688f0d3003d59d68c..f5e19b9bf3cf3464218cfbfba33ae02eb6d2366c 100644 (file)
--- a/makefile
+++ b/makefile
@@ -63,8 +63,11 @@ purge: clean
        rm -f purge $(ALLEXE:%=%.exe)
        $(call PASS, SUCCESS)
 
+valgrinds:
+       $(MAKE) $(addprefix valgrind_,$(ALLEXE))
+
 wipe: purge
-       $(call TITLE, "wiping")
+       $(call TITLE, "Wiping")
        touch wipe
        rm -f wipe $(wildcard *.gcda *.gcno)
        $(call PASS, SUCCESS)
@@ -78,13 +81,13 @@ include $(wildcard *.d)
 include $(wildcard *.ld)
 
 gcov_%:
-       make purge
-       CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs -ftest-coverage" make
-       make test_$(@:gcov_%=%)
+       $(MAKE) purge
+       CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs -ftest-coverage" $(MAKE)
+       $(MAKE) test_$(@:gcov_%=%)
        gcov `sed -e 's/\.exe:/.c/;s/\.o/.c/g' $(@:gcov_%=%.ld)`
        touch gcov
        rm -f gcov $(wildcard *.gcda *.gcno)
-       make purge
+       $(MAKE) purge
 
 %.test: %.c
        $(call TITLE, "Building $@")
@@ -102,10 +105,10 @@ test_%: %.test %.exe
        done; \
        test "$$RC" -ne 1 
 
-valgrind_%: %
+valgrind_%: %.exe
        VALGRIND="valgrind -v --leak-check=full --show-reachable=yes --log-fd=2"; \
        export VALGRIND; \
-       $(MAKE) test_$<
+       $(MAKE) $(@:valgrind_%=test_%)
 
 %.d: %.c
        $(call TITLE, "Building $@")