aboutsummaryrefslogtreecommitdiff
path: root/rules.mk
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2023-07-30 17:11:43 +0300
committeraqua <aqua@iserlohn-fortress.net>2023-07-30 17:11:43 +0300
commit3c440f91ea7f26f7c5ed10c18bd28348020d8ebe (patch)
tree1b88afc9e7ae16dd7a827c93e6467096c6760047 /rules.mk
parentFix compiler warnings (diff)
downloadkernel-3c440f91ea7f26f7c5ed10c18bd28348020d8ebe.tar.xz
Added make wrapper
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)"