aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <[email protected]>2019-10-23 13:29:57 +0200
committerLinus Walleij <[email protected]>2019-10-23 13:29:57 +0200
commit459f7cb9a3b90b1574acc001ad1f6bf5bb748ac7 (patch)
tree1c673a8a0a4c40754df2eebe6257c34229aaad83
parent7d194c2100ad2a6dded545887d02754948ca5241 (diff)
parent4a6a6f5c4aeedb72db871d60bfcca89835f317aa (diff)
Merge tag 'gpio-v5.4-rc5-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes
gpio fixes for v5.4-rc5 - fix building gpio selftests
-rw-r--r--tools/gpio/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpio/Makefile b/tools/gpio/Makefile
index 6ecdd1067826..1178d302757e 100644
--- a/tools/gpio/Makefile
+++ b/tools/gpio/Makefile
@@ -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