Commit f6d344cd authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Shuah Khan

selftests: Fix build when $(O) points to a relative path

Build of bpf and tc-testing selftests fails when the relative path of
the build directory is specified.

make -C tools/testing/selftests O=build0
make[1]: Entering directory '/linux_mainline/tools/testing/selftests/bpf'
../../../scripts/Makefile.include:4: *** O=build0 does not exist.  Stop.
make[1]: Entering directory '/linux_mainline/tools/testing/selftests/tc-testing'
../../../scripts/Makefile.include:4: *** O=build0 does not exist.  Stop.

Makefiles of bpf and tc-testing include scripts/Makefile.include file.
This file has sanity checking inside it which checks the output path.
The output path is not relative to the bpf or tc-testing. The sanity
check fails. Expand the output path to get rid of this error. The fix is
the same as mentioned in commit 150a2732 ("bpf, preload: Fix build
when $(O) points to a relative path").
Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent a50a88f0
...@@ -177,6 +177,7 @@ all: khdr ...@@ -177,6 +177,7 @@ all: khdr
BUILD_TARGET=$$BUILD/$$TARGET; \ BUILD_TARGET=$$BUILD/$$TARGET; \
mkdir $$BUILD_TARGET -p; \ mkdir $$BUILD_TARGET -p; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \
O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \ $(if $(FORCE_TARGETS),|| exit); \
ret=$$((ret * $$?)); \ ret=$$((ret * $$?)); \
done; exit $$ret; done; exit $$ret;
...@@ -184,7 +185,8 @@ all: khdr ...@@ -184,7 +185,8 @@ all: khdr
run_tests: all run_tests: all
@for TARGET in $(TARGETS); do \ @for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \ BUILD_TARGET=$$BUILD/$$TARGET; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \
O=$(abs_objtree); \
done; done;
hotplug: hotplug:
...@@ -235,6 +237,7 @@ ifdef INSTALL_PATH ...@@ -235,6 +237,7 @@ ifdef INSTALL_PATH
for TARGET in $(TARGETS); do \ for TARGET in $(TARGETS); do \
BUILD_TARGET=$$BUILD/$$TARGET; \ BUILD_TARGET=$$BUILD/$$TARGET; \
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install \
O=$(abs_objtree) \
$(if $(FORCE_TARGETS),|| exit); \ $(if $(FORCE_TARGETS),|| exit); \
ret=$$((ret * $$?)); \ ret=$$((ret * $$?)); \
done; exit $$ret; done; exit $$ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment