On Tue, Nov 19, 2019 at 10:56:26AM +0000, Quentin Monnet wrote: > Building selftests with 'make TARGETS=bpf kselftest' was fixed in commit > 55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine > srctree"). However, by updating $(srctree) in tools/bpf/Makefile for > in-tree builds only, we leave out the case where we pass an output > directory to build BPF tools, but $(srctree) is not set. This > typically happens for: > > $ make -s tools/bpf O=/tmp/foo > Makefile:40: /tools/build/Makefile.feature: No such file or directory > > Fix it by updating $(srctree) in the Makefile not only for out-of-tree > builds, but also if $(srctree) is empty. > > Detected with test_bpftool_build.sh. > > Fixes: 55d554f5d140 ("tools: bpf: Use !building_out_of_srctree to determine srctree") > Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Quentin Monnet <quentin.monnet@xxxxxxxxxxxxx> > Acked-by: Jakub Kicinski <jakub.kicinski@xxxxxxxxxxxxx> Applied, thanks!