OSDN Git Service

tools/bpf/runqslower: Rebuild libbpf.a on libbpf source change
authorSong Liu <songliubraving@fb.com>
Tue, 4 Feb 2020 21:50:37 +0000 (13:50 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 5 Feb 2020 21:05:28 +0000 (22:05 +0100)
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")
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200204215037.2258698-1-songliubraving@fb.com
tools/bpf/runqslower/Makefile

index 87eae5b..39edd68 100644 (file)
@@ -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 $@)