From: Andrea Righi <arighi@nvidia.com>
To: Bing Huang <huangbing@kylinos.cn>
Cc: tj@kernel.org, void@manifault.com, changwoo@igalia.com,
joshdon@google.com, brho@google.com, haoluo@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tools/sched_ext: Fix errors when running make mrproper
Date: Mon, 5 May 2025 09:22:25 +0200 [thread overview]
Message-ID: <aBhnMUJJzBATtS2_@gpd3> (raw)
In-Reply-To: <20250430024833.196192-1-huangbing@kylinos.cn>
Hi Bing,
On Wed, Apr 30, 2025 at 10:48:33AM +0800, Bing Huang wrote:
> If the system environment used to compile the kernel code does not
> have the BTF feature enabled, running make mrproper will result in
> errors similar to the following:
>
> Makefile:84: *** Cannot find a vmlinux for VMLINUX_BTF at any of " ../../vmlinux /sys/kernel/btf/vmlinux /boot/vmlinux-4.4.131-20190505.kylin.server-generic". Stop.
> make[2]: *** [Makefile:192: sched_ext_clean] Error 2
> make[1]: *** [/home/huangbing/klinux/Makefile:1374: sched_ext] Error 2
> make: *** [Makefile:236: __sub-make] Error 2
>
> Signed-off-by: Bing Huang <huangbing@kylinos.cn>
> ---
> tools/sched_ext/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/sched_ext/Makefile b/tools/sched_ext/Makefile
> index ca3815e572d8..5329cae284c6 100644
> --- a/tools/sched_ext/Makefile
> +++ b/tools/sched_ext/Makefile
> @@ -79,9 +79,11 @@ VMLINUX_BTF_PATHS ?= $(if $(O),$(O)/vmlinux) \
> /sys/kernel/btf/vmlinux \
> /boot/vmlinux-$(shell uname -r)
> VMLINUX_BTF ?= $(abspath $(firstword $(wildcard $(VMLINUX_BTF_PATHS))))
> +ifeq ($(findstring $(MAKECMDGOALS),clean),)
Looks good, just a minor nit, can we do something like this instead?
ifneq ($(sort $(MAKECMDGOALS)),clean)
Since we only support "clean", we can simply check if "clean" is the only
target specified.
This also handles odd cases like `make clean clean`, where we still skip
the check as expected. WDYT?
Thanks,
-Andrea
> ifeq ($(VMLINUX_BTF),)
> $(error Cannot find a vmlinux for VMLINUX_BTF at any of "$(VMLINUX_BTF_PATHS)")
> endif
> +endif
>
> BPFTOOL ?= $(DEFAULT_BPFTOOL)
>
> --
> 2.25.1
>
next parent reply other threads:[~2025-05-05 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250430024833.196192-1-huangbing@kylinos.cn>
2025-05-05 7:22 ` Andrea Righi [this message]
2025-05-06 7:17 ` [PATCH] tools/sched_ext: Fix errors when running make mrproper Bing Huang
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=aBhnMUJJzBATtS2_@gpd3 \
--to=arighi@nvidia.com \
--cc=brho@google.com \
--cc=changwoo@igalia.com \
--cc=haoluo@google.com \
--cc=huangbing@kylinos.cn \
--cc=joshdon@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=void@manifault.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