|author||Shuah Khan <firstname.lastname@example.org>||2019-04-19 16:31:28 -0600|
|committer||Shuah Khan <email@example.com>||2019-04-22 17:02:26 -0600|
|parent||selftests/ipc: Fix msgque compiler warnings (diff)|
selftests: build and run gpio when output directory is the src dir
Build and run gpio when output directory is the src dir. gpio has dependency on tools/gpio and builds tools/gpio objects in the src directory in all cases making the src repo dirty even when object relocation is specified. This fixes the following commands from generating gpio objects in the source repository: make O=dir kselftest export KBUILD_OUTPUT=dir; make kselftest make O=dir -C tools/testing/selftests expoert KBUILD_OUTPUT=dir; make -C tools/testing/selftests The following commands still build gpio objects in the source repo (gpio Makefile needs to fixed): make O=dir kselftest TARGETS="gpio" export KBUILD_OUTPUT=dir; make kselftest TARGETS="gpio" make O=dir -C tools/testing/selftests TARGETS="gpio" expoert KBUILD_OUTPUT=dir; make -C tools/testing/selftests TARGETS="gpio" Signed-off-by: Shuah Khan <firstname.lastname@example.org>
Diffstat (limited to 'tools/testing/selftests')
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index b43c5f41fb3e..f2ebf8cf4686 100644
@@ -99,6 +99,15 @@ ARCH ?= $(SUBARCH)
export KSFT_KHDR_INSTALL_DONE := 1
+# build and run gpio when output directory is the src dir.
+# gpio has dependency on tools/gpio and builds tools/gpio
+# objects in the src directory in all cases making the src
+# repo dirty even when objects are relocated.
+ TMP := $(filter-out gpio, $(TARGETS))
+ TARGETS := $(TMP)
# set default goal to all, so make without a target runs all, even when
# all isn't the first target in the file.
.DEFAULT_GOAL := all