Received: by 10.213.65.68 with SMTP id h4csp1187854imn; Mon, 26 Mar 2018 02:34:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELt3ckfnIXPQNHiKQ7BLwfkVpvUNA8JF3erB+9oO7WVQf84vzPYwPQY/foF3ohQTtLHh65/t X-Received: by 10.99.157.142 with SMTP id i136mr28426721pgd.14.1522056868616; Mon, 26 Mar 2018 02:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522056868; cv=none; d=google.com; s=arc-20160816; b=WKHZLVytZZq1TzvuoI2IwYbtYt8NtI+R6NVrJXkRbzB0Z7Nn7UvcQUsR8hx4oLLUUP p8wNUFhN+GDGTInM4tB78Ph5p83JMNMnplbjmO36mKuSWsBngsgEgnntiqa6BTFZFNrL Pm3PRuliuRvG3uNKptnM5I0rJhtw+bTlooVrNawMfYNnqwev7TNB3jTz+iwxXc3vY7GL IpU95OpTBF2cbUbxtktaAVR5f6blv+pQUieoIcPWlk19Z4ccA05tcExIDqrF299vgahF Ln2HuKrRPwu0jX4wciB13iyqCzPJC5kWa1nE9KZhNF+6bVYA3r5oe4aOgZvb1S8zwSuZ 30wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=YKRdhMFMa2klBYzHtjv9dpdxWFczZI3KajGicxK/0RY=; b=MOM6MhSovSRmp2JvllDdIcc0Fq+uI1fd2TTg5M4U3XhJlfMVCMwQDz+yFNvZAC8oda nXp3+zgKHr8hMXVM9MPDP1Y5xf2VFTdLimuSKgCEWFZW0iNm9v24eK6OEKWwuhFYxDFP wWaxOmyGkjFnMexJdQtrJ75ufq2hgP+/7aeHBitHBF1c47L5/ePGeQ67lB/8Vr1eNRlv Q9BXrfzyGEU0cT7NrIU+yFd+Z0Zwp/Hy/WFticJkt4GEvnsSZ0ob/ep9sMdR/qNnHdMh eIjO7lwRaUAx7/bxd3Zkk1OwBKMx1XGDyerbYErdJpyV8ZgUZ9Onz4pmil+KecBNHQcB q9Hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k3si11109005pff.82.2018.03.26.02.34.14; Mon, 26 Mar 2018 02:34:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014AbeCZJdU (ORCPT + 99 others); Mon, 26 Mar 2018 05:33:20 -0400 Received: from mga17.intel.com ([192.55.52.151]:43803 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbeCZJdN (ORCPT ); Mon, 26 Mar 2018 05:33:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2018 02:33:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,364,1517904000"; d="scan'208";a="36851568" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.59]) by FMSMGA003.fm.intel.com with ESMTP; 26 Mar 2018 02:33:11 -0700 From: changbin.du@intel.com To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH 1/4] selftests/Makefile: append a slash to env variable OUTPUT Date: Mon, 26 Mar 2018 17:23:25 +0800 Message-Id: <1522056208-4004-2-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522056208-4004-1-git-send-email-changbin.du@intel.com> References: <1522056208-4004-1-git-send-email-changbin.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Changbin Du The tools/build/Makefile.build use 'OUTPUT' variable as below example: objprefix := $(subst ./,,$(OUTPUT)$(dir)/) So it requires the 'OUTPUT' already has a slash at the end. This patch can kill below odd paths: make[3]: Entering directory '/home/changbin/work/linux/tools/gpio' CC /home/changbin/work/linux/tools/testing/selftests/gpiolsgpio.o CC /home/changbin/work/linux/tools/testing/selftests/gpiogpio-utils.o LD /home/changbin/work/linux/tools/testing/selftests/gpiolsgpio-in.o A correct path should be: /home/changbin/work/linux/tools/testing/selftests/gpio/lsgpio.o Signed-off-by: Changbin Du --- tools/testing/selftests/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 7442dfb..7916aa2 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -71,31 +71,31 @@ all: @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ mkdir $$BUILD_TARGET -p; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET;\ done; run_tests: all @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET run_tests;\ done; hotplug: @for TARGET in $(TARGETS_HOTPLUG); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET;\ done; run_hotplug: hotplug @for TARGET in $(TARGETS_HOTPLUG); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET run_full_test;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET run_full_test;\ done; clean_hotplug: @for TARGET in $(TARGETS_HOTPLUG); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET clean;\ done; run_pstore_crash: @@ -111,7 +111,7 @@ ifdef INSTALL_PATH mkdir -p $(INSTALL_PATH) @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install; \ done; @# Ask all targets to emit their test scripts @@ -131,7 +131,7 @@ ifdef INSTALL_PATH echo "echo ; echo Running tests in $$TARGET" >> $(ALL_SCRIPT); \ echo "echo ========================================" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ - make -s --no-print-directory OUTPUT=$$BUILD_TARGET -C $$TARGET emit_tests >> $(ALL_SCRIPT); \ + make -s --no-print-directory OUTPUT=$$BUILD_TARGET/ -C $$TARGET emit_tests >> $(ALL_SCRIPT); \ echo "cd \$$ROOT" >> $(ALL_SCRIPT); \ done; @@ -143,7 +143,7 @@ endif clean: @for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - make OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\ + make OUTPUT=$$BUILD_TARGET/ -C $$TARGET clean;\ done; .PHONY: all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean -- 2.7.4