]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpf: Use !building_out_of_srctree to determine srctree
authorShuah Khan <skhan@linuxfoundation.org>
Fri, 27 Sep 2019 01:13:44 +0000 (19:13 -0600)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 30 Sep 2019 08:53:34 +0000 (10:53 +0200)
commit2c2f8c67dfd6c8c0dac919214212a2f4a9a923ee
tree85687b7767bf1c94f63f8c4d7944068e19dfca84
parent14b6c7a8bf32b6a88b81b84005ffd541c0f659f2
tools: bpf: Use !building_out_of_srctree to determine srctree

make TARGETS=bpf kselftest fails with:

Makefile:127: tools/build/Makefile.include: No such file or directory

When the bpf tool make is invoked from tools Makefile, srctree is
cleared and the current logic check for srctree equals to empty
string to determine srctree location from CURDIR.

When the build in invoked from selftests/bpf Makefile, the srctree
is set to "." and the same logic used for srctree equals to empty is
needed to determine srctree.

Check building_out_of_srctree undefined as the condition for both
cases to fix "make TARGETS=bpf kselftest" build failure.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20190927011344.4695-1-skhan@linuxfoundation.org
tools/bpf/Makefile
tools/lib/bpf/Makefile