Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966322AbdCXQTz (ORCPT ); Fri, 24 Mar 2017 12:19:55 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:54827 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756416AbdCXQTq (ORCPT ); Fri, 24 Mar 2017 12:19:46 -0400 Date: Fri, 24 Mar 2017 09:18:54 -0700 From: Darren Hart To: Linux Kernel Mailing List Cc: linux-kselftest@vger.kernel.org, bamvor.zhangjian@huawei.com, Shuah Khan , stable@vger.kernel.org Subject: [PATCH] selftests/futex: Fix build error with OUTPUT variable Message-ID: <20170324161854.GA6958@fury> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2177 Lines: 65 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) Cc: linux-kselftest@vger.kernel.org Cc: bamvor.zhangjian@huawei.com Cc: Shuah Khan Cc: # 4.10.x- --- tools/testing/selftests/futex/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile index 653c5cd..c8095e6 100644 --- a/tools/testing/selftests/futex/Makefile +++ b/tools/testing/selftests/futex/Makefile @@ -8,7 +8,7 @@ include ../lib.mk all: for DIR in $(SUBDIRS); do \ - BUILD_TARGET=$$OUTPUT/$$DIR; \ + BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done @@ -22,7 +22,7 @@ override define INSTALL_RULE install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) @for SUBDIR in $(SUBDIRS); do \ - BUILD_TARGET=$$OUTPUT/$$SUBDIR; \ + BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \ mkdir $$BUILD_TARGET -p; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ done; @@ -34,7 +34,7 @@ endef clean: for DIR in $(SUBDIRS); do \ - BUILD_TARGET=$$OUTPUT/$$DIR; \ + BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done -- 2.9.3 -- Darren Hart VMware Open Source Technology Center