diff mbox series

[v2,bpf] tools/bpf/runqslower: Rebuild libbpf.a on libbpf source change

Message ID 20200204215037.2258698-1-songliubraving@fb.com
State Accepted
Delegated to: BPF Maintainers
Headers show
Series [v2,bpf] tools/bpf/runqslower: Rebuild libbpf.a on libbpf source change | expand

Commit Message

Song Liu Feb. 4, 2020, 9:50 p.m. UTC
Add missing dependency of $(BPFOBJ) to $(LIBBPF_SRC), so that running make
in runqslower/ will rebuild libbpf.a when there is change in libbpf/.

Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf")
Acked-by: Andrii Nakryiko <andriin@fb.com>
Cc: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
 tools/bpf/runqslower/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Borkmann Feb. 5, 2020, 9:22 p.m. UTC | #1
On Tue, Feb 04, 2020 at 01:50:37PM -0800, Song Liu wrote:
> Add missing dependency of $(BPFOBJ) to $(LIBBPF_SRC), so that running make
> in runqslower/ will rebuild libbpf.a when there is change in libbpf/.
> 
> Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf")
> Acked-by: Andrii Nakryiko <andriin@fb.com>
> Cc: Andrii Nakryiko <andriin@fb.com>
> Signed-off-by: Song Liu <songliubraving@fb.com>

Applied, thanks!
diff mbox series

Patch

diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
index 87eae5be9bcd..39edd68afa8e 100644
--- a/tools/bpf/runqslower/Makefile
+++ b/tools/bpf/runqslower/Makefile
@@ -75,7 +75,7 @@  $(OUTPUT)/vmlinux.h: $(VMLINUX_BTF_PATH) | $(OUTPUT) $(BPFTOOL)
 	fi
 	$(Q)$(BPFTOOL) btf dump file $(VMLINUX_BTF_PATH) format c > $@
 
-$(BPFOBJ): | $(OUTPUT)
+$(BPFOBJ): $(wildcard $(LIBBPF_SRC)/*.[ch] $(LIBBPF_SRC)/Makefile) | $(OUTPUT)
 	$(Q)$(MAKE) $(submake_extras) -C $(LIBBPF_SRC)			       \
 		    OUTPUT=$(abspath $(dir $@))/ $(abspath $@)