Skip to contentSkip to conversation

selftests/*/Makefile: stop calling headers_install

PATCH New Anders Roxell 1 participant 1 message Mar 13, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/*/Makefile: stop calling headers_install

Various tests should not call headers_install. Adding headers_install as a prereq before building kselftests.

---
 tools/testing/selftests/Makefile      | 5 ++++-
 tools/testing/selftests/gpio/Makefile | 6 +-----
 tools/testing/selftests/vm/Makefile   | 4 ----
 3 files changed, 5 insertions(+), 10 deletions(-)
tools/testing/selftests/Makefile +4 -1
index 2d73f7f0b180..5b8553654d6b 100644
@@ -74,13 +74,16 @@ endif
 export KSFT_TAP_LEVEL=`echo 1`
 
 export BUILD
-all:
+all: headers_install
 	@for TARGET in $(TARGETS); do		\
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
 		mkdir $$BUILD_TARGET  -p;	\
 		make OUTPUT=$$BUILD_TARGET -C $$TARGET;\
 	done;
 
+headers_install:
+	make -C ../../.. headers_install
+
 run_tests: all
 	@for TARGET in $(TARGETS); do \
 		BUILD_TARGET=$$BUILD/$$TARGET;	\
tools/testing/selftests/gpio/Makefile +1 -5
index 1bbb47565c55..9ef4d751268b 100644
@@ -21,11 +21,7 @@ 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): ../../../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/
-
tools/testing/selftests/vm/Makefile +0 -4
index fdefa2295ddc..58759454b1d0 100644
@@ -25,10 +25,6 @@ TEST_PROGS := run_vmtests
 
 include ../lib.mk
 
-$(OUTPUT)/userfaultfd: ../../../../usr/include/linux/kernel.h
 $(OUTPUT)/userfaultfd: LDLIBS += -lpthread
 
 $(OUTPUT)/mlock-random-test: LDLIBS += -lcap
-
-../../../../usr/include/linux/kernel.h:
-	make -C ../../../.. headers_install
Signature · 1 line
2.11.0