]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Skip re-installing headers file if source is older than target
authorQuentin Monnet <quentin@isovalent.com>
Thu, 7 Oct 2021 19:44:27 +0000 (20:44 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 18:47:34 +0000 (11:47 -0700)
commitc77214ef2c1f12a464ba6674b431567cb50bad5a
tree93f5b7898e3909926662071f591309354ad730b2
parent5ed10b2639b35c451f5860a7f5326ae3b7874ddf
libbpf: Skip re-installing headers file if source is older than target

The "install_headers" target in libbpf's Makefile would unconditionally
export all API headers to the target directory. When those headers are
installed to compile another application, this means that make always
finds newer dependencies for the source files relying on those headers,
and deduces that the targets should be rebuilt.

Avoid that by making "install_headers" depend on the source header
files, and (re-)install them only when necessary.

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