From 0e6598355040f92db6f373883c739a89c93fd63f Mon Sep 17 00:00:00 2001 From: aqua Date: Fri, 4 Aug 2023 08:57:11 +0300 Subject: rules.mk: make include paths absolute --- rules.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rules.mk b/rules.mk index 5407a61..ed72b27 100644 --- a/rules.mk +++ b/rules.mk @@ -1,5 +1,6 @@ # variables VCS_ROOT = $(shell git rev-parse --show-toplevel) +CWD = $(shell pwd) # generate build rules from variables # This makefile defines the following targets: @@ -74,9 +75,9 @@ all: ${DEFAULT_TARGETS} @echo " -> Built all in ${COMPONENT}" # extra flags -${ARCH}_CFLAGS += -I../lib/libk \ +${ARCH}_CFLAGS += -I${VCS_ROOT}/lib/libk \ -Werror=implicit-function-declaration -${ARCH}_CXXFLAGS += -I../lib/libk -Drestrict=__restrict__ +${ARCH}_CXXFLAGS += -I${VCS_ROOT}/lib/libk -Drestrict=__restrict__ # Target suffix rules # -MD output makefile dependency rule @@ -120,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)" + @echo " -> Running tests in $(CWD:${VCS_ROOT}/%=%)" @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose ${TESTS} test.quiet: ${TESTS} - @echo " -> Running tests in $(shell pwd | xargs basename)" + @echo " -> Running tests in $(CWD:${VCS_ROOT}/%=%)" @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py ${TESTS} valgrind: ${TESTS} - @echo " -> Running valgrind on tests in $(shell pwd | xargs basename)" + @echo " -> Running valgrind on tests in $(CWD:${VCS_ROOT}/%=%)" @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --verbose --valgrind ${TESTS} valgrind.quiet: ${TESTS} - @echo " -> Running valgrind on tests in $(shell pwd | xargs basename)" + @echo " -> Running valgrind on tests in $(CWD:${VCS_ROOT}/%=%)" @[[ -z "${TESTS}" ]] || ${VCS_ROOT}/scripts/test_runner.py --valgrind ${TESTS} clean: FORCE -- cgit v1.2.1