From: Shuah Khan <shuahkh@osg.samsung.com>
To: yamada.masahiro@socionext.com, mmarek@suse.com, shuah@kernel.org,
tglx@linutronix.de, mingo@redhat.com, peterz@infradead.org,
bamvor.zhangjian@linaro.org, emilio.lopez@collabora.co.uk,
corbet@lwn.net
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
tytso@mit.edu, ebiederm@xmission.com, Tim.Bird@sony.com,
gregkh@linuxfoundation.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case
Date: Wed, 20 Sep 2017 11:32:46 -0600 [thread overview]
Message-ID: <20170920173246.11224-1-shuahkh@osg.samsung.com> (raw)
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 <shuahkh@osg.samsung.com>
---
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:
--
2.11.0
next reply other threads:[~2017-09-20 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 17:32 Shuah Khan [this message]
2017-09-21 1:14 ` [PATCH v2] Makefile: kselftest and kselftest-clean fail for make O=dir case Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170920173246.11224-1-shuahkh@osg.samsung.com \
--to=shuahkh@osg.samsung.com \
--cc=Tim.Bird@sony.com \
--cc=bamvor.zhangjian@linaro.org \
--cc=corbet@lwn.net \
--cc=ebiederm@xmission.com \
--cc=emilio.lopez@collabora.co.uk \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mmarek@suse.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=tytso@mit.edu \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).