tools: gpio: Use !building_out_of_srctree to determine srctree
Shuah Khan
maintainerPATCH RESEND 1/1 tools: gpio: Use !building_out_of_srctree to determine srctree
make TARGETS=gpio kselftest fails with:
Makefile:23: tools/build/Makefile.include: No such file or directory
When the gpio tool make is invoked from tools Makefile, srctree is cleared and the current logic check for srctree equals to empty string to determine srctree location from CURDIR.
When the build in invoked from selftests/gpio Makefile, the srctree is set to "." and the same logic used for srctree equals to empty is needed to determine srctree.
Check building_out_of_srctree undefined as the condition for both cases to fix "make TARGETS=gpio kselftest" build failure.
---
Rsending with corrected address for [email protected]
tools/gpio/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/gpio/Makefile +5 -1
@@ -3,7 +3,11 @@ include ../scripts/Makefile.include bindir ?= /usr/bin -ifeq ($(srctree),) +# This will work when gpio is built in tools env. where srctree +# isn't set and when invoked from selftests build, where srctree +# is set to ".". building_out_of_srctree is undefined for in srctree +# builds +ifndef building_out_of_srctree srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) endif
Signature · 1 line
2.20.1
pt., 27 wrz 2019 o 03:16 Shuah Khan <[email protected]> napisał(a):
Quoted 41 lines
make TARGETS=gpio kselftest fails with:
Makefile:23:
tools/build/Makefile.include: No such file or directoryWhen the gpio tool make is invoked from tools
Makefile, srctree is cleared and the current logic check for srctree equals to empty string to determine srctree location from CURDIR.When the build in invoked from selftests/gpio
Makefile, the srctree is set to "." and the same logic used for srctree equals to empty is needed to determine srctree.Check
building_out_of_srctreeundefined as the condition for both cases to fix "make TARGETS=gpio kselftest" build failure.Signed-off-by Shuah Khan <[email protected]>---
Rsending with corrected address for [email protected]tools/gpio/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tools/gpio/Makefile +5
-2@@ -3,7 +3,11 @@ include ../scripts/Makefile.include bindir ?= /usr/bin -ifeq ($(srctree),) +# This will work when gpio is built in tools env. where srctree +# isn't set and when invoked from selftests build, where srctree +# is set to ".". building_out_of_srctree is undefined for in srctree +# builds +ifndef building_out_of_srctree srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) endif --
Quoted 2 lines
2.20.1
Applied for fixes, thanks!
Bart