]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: set the BUILD variable to absolute path
authorMuhammad Usama Anjum <usama.anjum@collabora.com>
Wed, 19 Jan 2022 10:15:22 +0000 (15:15 +0500)
committerShuah Khan <skhan@linuxfoundation.org>
Thu, 24 Feb 2022 00:20:10 +0000 (17:20 -0700)
commit031241677424bf01193928549613047dbd9eea07
tree516140d677a8b7eb4ac0ace30af77d61dc947eac
parent0722de7f30577439ad50be72768aa2fc59f55a10
selftests: set the BUILD variable to absolute path

The build of kselftests fails if relative path is specified through
KBUILD_OUTPUT or O=<path> method. BUILD variable is used to determine
the path of the output objects. When make is run from other directories
with relative paths, the exact path of the build objects is ambiguous
and build fails.

make[1]: Entering directory '/home/usama/repos/kernel/linux_mainline2/tools/testing/selftests/alsa'
gcc     mixer-test.c -L/usr/lib/x86_64-linux-gnu -lasound  -o build/kselftest/alsa/mixer-test
/usr/bin/ld: cannot open output file build/kselftest/alsa/mixer-test

Set the BUILD variable to the absolute path of the output directory.
Make the logic readable and easy to follow. Use spaces instead of tabs
for indentation as if with tab indentation is considered recipe in make.

Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/Makefile