Skip to contentSkip to conversation

bpftool: fix make dependencies for vmlinux.h

PATCH Applied Artem Savkov 3 participants 3 messages May 13, 2024 – May 17, 2024

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bpftool: fix make dependencies for vmlinux.h

With pre-generated vmlinux.h there is no dependency on neither vmlinux nor bootstrap bpftool. Define dependencies separately for both modes. This avoids needless rebuilds in some corner cases.

---
 tools/bpf/bpftool/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/bpf/bpftool/Makefile +2 -1
index dfa4f1bebbb31..ba927379eb201 100644
@@ -204,10 +204,11 @@ ifeq ($(feature-clang-bpf-co-re),1)
 
 BUILD_BPF_SKELS := 1
 
-$(OUTPUT)vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL_BOOTSTRAP)
 ifeq ($(VMLINUX_H),)
+$(OUTPUT)vmlinux.h: $(VMLINUX_BTF) $(BPFTOOL_BOOTSTRAP)
 	$(QUIET_GEN)$(BPFTOOL_BOOTSTRAP) btf dump file $< format c > $@
 else
+$(OUTPUT)vmlinux.h: $(VMLINUX_H)
 	$(Q)cp "$(VMLINUX_H)" $@
 endif
 
Signature · 1 line
2.44.0
maintainer Acked-by on v1 1/1
#1 lore raw

2024-05-13 12:27 UTC+0100 ~ Artem Savkov <[email protected]>

Quoted 6 lines

With pre-generated vmlinux.h there is no dependency on neither vmlinux nor bootstrap bpftool. Define dependencies separately for both modes. This avoids needless rebuilds in some corner cases.

Looks good, thank you.

#2 lore raw
In reply to Artem Savkov
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:

Quoted 8 lines · On Mon, 13 May 2024 13:26:58 +0200 you wrote:

With pre-generated vmlinux.h there is no dependency on neither vmlinux nor bootstrap bpftool. Define dependencies separately for both modes. This avoids needless rebuilds in some corner cases.

[...]

Here is the summary with links:
- [bpf-next] bpftool: fix make dependencies for vmlinux.h

    https://git.kernel.org/bpf/bpf-next/c/83eea61776c9

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html