]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: Refactor build to remove tools/lib/bpf from include path
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 20 Jan 2020 13:06:52 +0000 (14:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 21 Jan 2020 00:37:46 +0000 (16:37 -0800)
commit3a29fec7e6982211edad4ddceeb26371bb5d3d2e
tree5e6605d9c61cda6988756b21cbe59e0972c64bbc
parent5ce322a05de833ceca433f094f41ceb8bc8be2eb
selftests: Refactor build to remove tools/lib/bpf from include path

To make sure no new files are introduced that doesn't include the bpf/
prefix in its #include, remove tools/lib/bpf from the include path
entirely.

Instead, we introduce a new header files directory under the scratch tools/
dir, and add a rule to run the 'install_headers' rule from libbpf to have a
full set of consistent libbpf headers in $(OUTPUT)/tools/include/bpf, and
then use $(OUTPUT)/tools/include as the include path for selftests.

For consistency we also make sure we put all the scratch build files from
other bpftool and libbpf into tools/build/, so everything stays within
selftests/.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/157952561246.1683545.2762245552022369203.stgit@toke.dk
tools/testing/selftests/bpf/.gitignore
tools/testing/selftests/bpf/Makefile