* [PATCH bpf-next] kbuild: Do not clean resolve_btfids if the output does not exist
@ 2021-02-11 12:40 Jiri Olsa
2021-02-11 19:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Olsa @ 2021-02-11 12:40 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: Nathan Chancellor, netdev, bpf, Martin KaFai Lau, Song Liu,
Yonghong Song, John Fastabend, KP Singh, Masahiro Yamada,
Michal Marek, linux-kbuild
Nathan reported issue with cleaning empty build directory:
$ make -s O=build distclean
../../scripts/Makefile.include:4: *** \
O=/ho...build/tools/bpf/resolve_btfids does not exist. Stop.
The problem that tools scripts require existing output
directory, otherwise it fails.
Adding check around the resolve_btfids clean target to
ensure the output directory is in place.
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 159d9592b587..b6fa039c18b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1088,8 +1088,14 @@ endif
PHONY += resolve_btfids_clean
+resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
+
+# tools/bpf/resolve_btfids directory might not exist
+# in output directory, skip its clean in that case
resolve_btfids_clean:
- $(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(abspath $(objtree))/tools/bpf/resolve_btfids clean
+ifneq ($(wildcard $(resolve_btfids_O)),)
+ $(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
+endif
ifdef CONFIG_BPF
ifdef CONFIG_DEBUG_INFO_BTF
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] kbuild: Do not clean resolve_btfids if the output does not exist
2021-02-11 12:40 [PATCH bpf-next] kbuild: Do not clean resolve_btfids if the output does not exist Jiri Olsa
@ 2021-02-11 19:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-02-11 19:30 UTC (permalink / raw)
To: Jiri Olsa
Cc: ast, daniel, andriin, nathan, netdev, bpf, kafai, songliubraving,
yhs, john.fastabend, kpsingh, masahiroy, michal.lkml,
linux-kbuild
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Thu, 11 Feb 2021 13:40:04 +0100 you wrote:
> Nathan reported issue with cleaning empty build directory:
>
> $ make -s O=build distclean
> ../../scripts/Makefile.include:4: *** \
> O=/ho...build/tools/bpf/resolve_btfids does not exist. Stop.
>
> The problem that tools scripts require existing output
> directory, otherwise it fails.
>
> [...]
Here is the summary with links:
- [bpf-next] kbuild: Do not clean resolve_btfids if the output does not exist
https://git.kernel.org/bpf/bpf-next/c/0e1aa629f1ce
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-11 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11 12:40 [PATCH bpf-next] kbuild: Do not clean resolve_btfids if the output does not exist Jiri Olsa
2021-02-11 19:30 ` patchwork-bot+netdevbpf
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).