summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/gpio
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2018-09-04 12:47:21 +0200
committerShuah Khan (Samsung OSG) <shuah@kernel.org>2018-09-05 08:12:09 -0600
commitb2d35fa5fc80c27e868e393dcab4c94a0d71737f (patch)
tree1ff2d280109a4b5b43cc5ec6a4e70ff23131ca78 /tools/testing/selftests/gpio
parentc31d02d1290e1e82a08015199e408228e152991f (diff)
selftests: add headers_install to lib.mk
If the kernel headers aren't installed we can't build all the tests. Add a new make target rule 'khdr' in the file lib.mk to generate the kernel headers and that gets include for every test-dir Makefile that includes lib.mk If the testdir in turn have its own sub-dirs the top_srcdir needs to be set to the linux-rootdir to be able to generate the kernel headers. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Diffstat (limited to 'tools/testing/selftests/gpio')
-rw-r--r--tools/testing/selftests/gpio/Makefile7
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile
index 1bbb47565c55..4665cdbf1a8d 100644
--- a/tools/testing/selftests/gpio/Makefile
+++ b/tools/testing/selftests/gpio/Makefile
@@ -21,11 +21,8 @@ endef
CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/
LDLIBS += -lmount -I/usr/include/libmount
-$(BINARIES): ../../../gpio/gpio-utils.o ../../../../usr/include/linux/gpio.h
+$(BINARIES):| khdr
+$(BINARIES): ../../../gpio/gpio-utils.o
../../../gpio/gpio-utils.o:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio
-
-../../../../usr/include/linux/gpio.h:
- make -C ../../../.. headers_install INSTALL_HDR_PATH=$(shell pwd)/../../../../usr/
-