]> git.baikalelectronics.ru Git - kernel.git/commit
samples/bpf: Do not FORCE-recompile libbpf
authorQuentin Monnet <quentin@isovalent.com>
Thu, 7 Oct 2021 19:44:36 +0000 (20:44 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 19:02:36 +0000 (12:02 -0700)
commit62c2e622aed693f3992bd509010933a242d91e81
tree1f47c8c1a1c490f7bdbf73a20a5dea70c87c948c
parent38ac02c1b711bc9d1f984ed1b7fe49beb2434732
samples/bpf: Do not FORCE-recompile libbpf

In samples/bpf/Makefile, libbpf has a FORCE dependency that force it to
be rebuilt. I read this as a way to keep the library up-to-date, given
that we do not have, in samples/bpf, a list of the source files for
libbpf itself. However, a better approach would be to use the
"$(wildcard ...)" function from make, and to have libbpf depend on all
the .c and .h files in its directory. This is what samples/bpf/Makefile
does for bpftool, and also what the BPF selftests' Makefile does for
libbpf.

Let's update the Makefile to avoid rebuilding libbpf all the time (and
bpftool on top of it).

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211007194438.34443-11-quentin@isovalent.com
samples/bpf/Makefile