libbpf: Skip re-installing headers file if source is older than target
mainline inclusion from mainline-5.16-rc1 commit b79c2ce3 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b79c2ce3baa99beea7f8410ce3154cc23e26dbd8 ------------------------------------------------- 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: NQuentin Monnet <quentin@isovalent.com> Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211007194438.34443-2-quentin@isovalent.com (cherry picked from commit b79c2ce3) Signed-off-by: NWang Yufen <wangyufen@huawei.com> Conflicts: tools/lib/bpf/Makefile Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录