aboutsummaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/rules.mk b/rules.mk
index 3f750f8..5407a61 100644
--- a/rules.mk
+++ b/rules.mk
@@ -1,3 +1,6 @@
+# variables
+VCS_ROOT = $(shell git rev-parse --show-toplevel)
+
# generate build rules from variables
# This makefile defines the following targets:
# - all: default goal, build all default targets
@@ -118,19 +121,19 @@ build/%.o: %.cc
.PHONY: test test.quiet valgrind valgrind.quiet clean.base FORCE
test: ${TESTS}
@echo " -> Running tests in $(shell pwd | xargs basename)"
- @../scripts/test_runner.py --verbose ${TESTS}
+ @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose ${TESTS}
test.quiet: ${TESTS}
@echo " -> Running tests in $(shell pwd | xargs basename)"
- @../scripts/test_runner.py ${TESTS}
+ @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py ${TESTS}
valgrind: ${TESTS}
@echo " -> Running valgrind on tests in $(shell pwd | xargs basename)"
- @../scripts/test_runner.py --verbose --valgrind ${TESTS}
+ @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose --valgrind ${TESTS}
valgrind.quiet: ${TESTS}
@echo " -> Running valgrind on tests in $(shell pwd | xargs basename)"
- @../scripts/test_runner.py --valgrind ${TESTS}
+ @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --valgrind ${TESTS}
clean: FORCE
@echo " -> Cleaning $(shell pwd | xargs basename)"