Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752102AbdIUBPe (ORCPT ); Wed, 20 Sep 2017 21:15:34 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:57695 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbdIUBPb (ORCPT ); Wed, 20 Sep 2017 21:15:31 -0400 X-Greylist: delayed 77732 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Sep 2017 21:15:31 EDT DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com v8L1FJri031798 X-Nifty-SrcIP: [209.85.161.171] X-Google-Smtp-Source: AOwi7QCxyWIGSG5RC4RI1/yp7/yWPR49YOR5TbomqSWD/ZGwoMS/8PIzEqaIcwO0N/NfLQ/V1PAuKWOJp6Jugk/28z4= MIME-Version: 1.0 In-Reply-To: <20170920173246.11224-1-shuahkh@osg.samsung.com> References: <20170920173246.11224-1-shuahkh@osg.samsung.com> From: Masahiro Yamada Date: Thu, 21 Sep 2017 10:14:38 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case To: Shuah Khan Cc: Michal Marek , shuah@kernel.org, Thomas Gleixner , Ingo Molnar , "Peter Zijlstra (Intel)" , Bamvor Zhang Jian , emilio.lopez@collabora.co.uk, Jonathan Corbet , "Theodore Ts'o" , ebiederm@xmission.com, Tim.Bird@sony.com, Greg Kroah-Hartman , Linux Kbuild mailing list , Linux Kernel Mailing List , linux-kselftest@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1685 Lines: 56 2017-09-21 2:32 GMT+09:00 Shuah Khan : > kselftest and kselftest-clean targets fail when object directory is > specified to relocate objects. Fix it so it can find the source tree > to build from. > > make O=/tmp/kselftest_top kselftest > > make[1]: Entering directory '/tmp/kselftest_top' > make[2]: Entering directory '/tmp/kselftest_top' > make[2]: *** tools/testing/selftests: No such file or directory. Stop. > make[2]: Leaving directory '/tmp/kselftest_top' > ./linux-kselftest/Makefile:1185: recipe for target > 'kselftest' failed > make[1]: *** [kselftest] Error 2 > make[1]: Leaving directory '/tmp/kselftest_top' > Makefile:145: recipe for target 'sub-make' failed > make: *** [sub-make] Error 2 > > Signed-off-by: Shuah Khan > --- > Changes v1 - V2: Simplify logic - use $(srctree) > > Makefile | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/Makefile b/Makefile > index 64cbc66cebca..7735fc32b24e 100644 > --- a/Makefile > +++ b/Makefile > @@ -1169,14 +1169,13 @@ headers_check: headers_install > > # --------------------------------------------------------------------------- > # Kernel selftest > - > PHONY += kselftest > kselftest: > - $(Q)$(MAKE) -C tools/testing/selftests run_tests > + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests > > PHONY += kselftest-clean > kselftest-clean: > - $(Q)$(MAKE) -C tools/testing/selftests clean > + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests clean > > PHONY += kselftest-merge > kselftest-merge: > -- Acked-by: Masahiro Yamada -- Best Regards Masahiro Yamada