diff options
author | Darren Hart <dvhart@infradead.org> | 2017-03-24 12:18:54 -0400 |
---|---|---|
committer | Shuah Khan <shuahkh@osg.samsung.com> | 2017-04-11 11:40:51 -0400 |
commit | bfedc31c4f2c1af3b509bbdc0aae051e8ad7d3ae (patch) | |
tree | d8e4a6ff699056e85c3c911311b575524ff474c9 /tools | |
parent | 9e14ef602b9e19b5e3d4594494e45a00ed2bc6ca (diff) |
selftests/futex: Fix build error with OUTPUT variable
The use of $$OUTPUT in the target shell commands resulted in an empty
string followed by an absolute path for which mkdir failed:
$ make -C tools/testing/selftests/futex
make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
Makefile:36: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'
for DIR in functional; do \
BUILD_TARGET=$OUTPUT/$DIR; \
mkdir $BUILD_TARGET -p; \
make OUTPUT=$BUILD_TARGET -C $DIR all;\
done
mkdir: cannot create directory ‘/functional’: Permission denied
Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
variable. The above make command now completes successfully.
Fixes: a8ba798bc8ec ("selftests: enable O and KBUILD_OUTPUT")
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Cc: linux-kselftest@vger.kernel.org
Cc: bamvor.zhangjian@huawei.com
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/futex/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile index 653c5cd9e44d..c8095e628e13 100644 --- a/tools/testing/selftests/futex/Makefile +++ b/tools/testing/selftests/futex/Makefile | |||
@@ -8,7 +8,7 @@ include ../lib.mk | |||
8 | 8 | ||
9 | all: | 9 | all: |
10 | for DIR in $(SUBDIRS); do \ | 10 | for DIR in $(SUBDIRS); do \ |
11 | BUILD_TARGET=$$OUTPUT/$$DIR; \ | 11 | BUILD_TARGET=$(OUTPUT)/$$DIR; \ |
12 | mkdir $$BUILD_TARGET -p; \ | 12 | mkdir $$BUILD_TARGET -p; \ |
13 | make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ | 13 | make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
14 | done | 14 | done |
@@ -22,7 +22,7 @@ override define INSTALL_RULE | |||
22 | install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) | 22 | install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) |
23 | 23 | ||
24 | @for SUBDIR in $(SUBDIRS); do \ | 24 | @for SUBDIR in $(SUBDIRS); do \ |
25 | BUILD_TARGET=$$OUTPUT/$$SUBDIR; \ | 25 | BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \ |
26 | mkdir $$BUILD_TARGET -p; \ | 26 | mkdir $$BUILD_TARGET -p; \ |
27 | $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ | 27 | $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ |
28 | done; | 28 | done; |
@@ -34,7 +34,7 @@ endef | |||
34 | 34 | ||
35 | clean: | 35 | clean: |
36 | for DIR in $(SUBDIRS); do \ | 36 | for DIR in $(SUBDIRS); do \ |
37 | BUILD_TARGET=$$OUTPUT/$$DIR; \ | 37 | BUILD_TARGET=$(OUTPUT)/$$DIR; \ |
38 | mkdir $$BUILD_TARGET -p; \ | 38 | mkdir $$BUILD_TARGET -p; \ |
39 | make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ | 39 | make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ |
40 | done | 40 | done |