Re: [PATCH] tools/bpf/runqslower: Rebuild libbpf.a on libbpf source change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Feb 4, 2020, at 10:43 AM, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
> 
> On Tue, Feb 4, 2020 at 9:54 AM Song Liu <songliubraving@xxxxxx> 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")
>> Cc: Andrii Nakryiko <andriin@xxxxxx>
>> Signed-off-by: Song Liu <songliubraving@xxxxxx>
>> ---
>> tools/bpf/runqslower/Makefile | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/tools/bpf/runqslower/Makefile b/tools/bpf/runqslower/Makefile
>> index 87eae5be9bcd..ea89fcb6d68f 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): $(LIBBPF_SRC) | $(OUTPUT)
> 
> Let's instead update this rule to do what selftests/bpf do (watch *.c,
> *.h and Makefile, and use all + install_headers to build libbpf and
> generate bpf_helper_defs.h?

Do you mean:

diff --git c/tools/bpf/runqslower/Makefile w/tools/bpf/runqslower/Makefile
index 87eae5be9bcd..39edd68afa8e 100644
--- c/tools/bpf/runqslower/Makefile
+++ w/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 $@)

> 
> Please also specify (in subject) which tree (bpf or bpf-next) you are targeting.

Aha, I started with "bpf: runqslower:". Then I some how changed it to 
tools/bpf/runquslower. Will fix. 

Thanks,
Song





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux