aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Savkov <[email protected]>2024-05-13 13:26:58 +0200
committerAlexei Starovoitov <[email protected]>2024-05-18 10:46:16 -0700
commite7b64f9d3f5b10186038201e0b91f734cbd7fc3d (patch)
tree623e749b91a4c1148678d935ec1fc53a59b4fee8
parent94133cf24bb33889aac267a7f0e3e6a08b8a8e5a (diff)
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. Suggested-by: Jan Stancek <[email protected]> Signed-off-by: Artem Savkov <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Acked-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
-rw-r--r--tools/bpf/bpftool/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index dfa4f1bebbb3..ba927379eb20 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -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