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: a8ba798bc8
("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>
This commit is contained in:
Родитель
9e14ef602b
Коммит
bfedc31c4f
|
@ -8,7 +8,7 @@ include ../lib.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
for DIR in $(SUBDIRS); do \
|
for DIR in $(SUBDIRS); do \
|
||||||
BUILD_TARGET=$$OUTPUT/$$DIR; \
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
||||||
mkdir $$BUILD_TARGET -p; \
|
mkdir $$BUILD_TARGET -p; \
|
||||||
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
||||||
done
|
done
|
||||||
|
@ -22,7 +22,7 @@ override define INSTALL_RULE
|
||||||
install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
|
install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
|
||||||
|
|
||||||
@for SUBDIR in $(SUBDIRS); do \
|
@for SUBDIR in $(SUBDIRS); do \
|
||||||
BUILD_TARGET=$$OUTPUT/$$SUBDIR; \
|
BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
|
||||||
mkdir $$BUILD_TARGET -p; \
|
mkdir $$BUILD_TARGET -p; \
|
||||||
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
|
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
|
||||||
done;
|
done;
|
||||||
|
@ -34,7 +34,7 @@ endef
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for DIR in $(SUBDIRS); do \
|
for DIR in $(SUBDIRS); do \
|
||||||
BUILD_TARGET=$$OUTPUT/$$DIR; \
|
BUILD_TARGET=$(OUTPUT)/$$DIR; \
|
||||||
mkdir $$BUILD_TARGET -p; \
|
mkdir $$BUILD_TARGET -p; \
|
||||||
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
|
||||||
done
|
done
|
||||||
|
|
Загрузка…
Ссылка в новой задаче