History

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"

Shuah Khan committed 7 years ago

Commit d917fb81 parent a147faa1 file · +9 −0Browse files

Unified · Split

tools/testing/selftests/Makefile+9−0
@@ -99,6 +99,15 @@ ARCH ?= $(SUBARCH) · 98 unmodified lines
99export KSFT_KHDR_INSTALL_DONE := 199export KSFT_KHDR_INSTALL_DONE := 1
100export BUILD100export BUILD
101 101
102# build and run gpio when output directory is the src dir.
103# gpio has dependency on tools/gpio and builds tools/gpio
104# objects in the src directory in all cases making the src
105# repo dirty even when objects are relocated.
106ifneq (1,$(DEFAULT_INSTALL_HDR_PATH))
107 TMP := $(filter-out gpio, $(TARGETS))
108 TARGETS := $(TMP)
109endif
110
102# set default goal to all, so make without a target runs all, even when111# set default goal to all, so make without a target runs all, even when
103# all isn't the first target in the file.112# all isn't the first target in the file.
104.DEFAULT_GOAL := all113.DEFAULT_GOAL := all

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t