From: Shuah Khan <skhan@linuxfoundation.org>
To: Muhammad Usama Anjum <usama.anjum@collabora.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Nick Desaulniers <ndesaulniers@google.com>,
Kieran Bingham <kbingham@kernel.org>
Cc: kernel@collabora.com,
Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v1] kbuild: fix sub directory output build of kselftests
Date: Mon, 27 Jun 2022 10:54:39 -0600 [thread overview]
Message-ID: <15532d64-6744-c8a5-184b-18358211d345@linuxfoundation.org> (raw)
In-Reply-To: <20220627070214.432390-1-usama.anjum@collabora.com>
On 6/27/22 1:02 AM, Muhammad Usama Anjum wrote:
> Build of kselftests fail if kernel's top most Makefile is used for
> running or building kselftests with separate output directory which is
> sub-directory. srctree is set to .. erroneously.
>
> make kselftest-all O=/linux_mainline/build
> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
>
> make kselftest-all O=build
> Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory
>
> Fix this by comparing abs_srctree with CURDIR instead of abs_objtree.
> CURDIR changes based on from where the command has been run and it sets
> the srctree correctly.
>
> Fixes: 25b146c5b8cee("kbuild: allow Kbuild to start from any directory")
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
> ---
> Changes in V2:
> - Correct the bugfix instead of workaround
>
> V1: https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora.com/
> ---
> Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index e66358b64ede..4090d7afcda4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -238,12 +238,12 @@ ifeq ($(need-sub-make),)
> # so that IDEs/editors are able to understand relative filenames.
> MAKEFLAGS += --no-print-directory
>
> -ifeq ($(abs_srctree),$(abs_objtree))
> +ifeq ($(abs_srctree),$(CURDIR))
> # building in the source tree
> srctree := .
> building_out_of_srctree :=
> else
> - ifeq ($(abs_srctree)/,$(dir $(abs_objtree)))
> + ifeq ($(abs_srctree)/,$(dir $(CURDIR)))
> # building in a subdirectory of the source tree
> srctree := ..
> else
>
Please resend cc'ing linux-kselftest
thanks,
-- Shuah
next prev parent reply other threads:[~2022-06-27 16:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 7:02 Muhammad Usama Anjum
2022-06-27 16:54 ` Shuah Khan [this message]
2022-06-27 17:45 ` Masahiro Yamada
2022-06-27 19:51 ` Shuah Khan
2022-06-30 9:44 ` Muhammad Usama Anjum
2022-07-01 10:07 ` 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=15532d64-6744-c8a5-184b-18358211d345@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=kbingham@kernel.org \
--cc=kernel@collabora.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
--cc=usama.anjum@collabora.com \
--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
Powered by JetHome