diff options
author | Abdul Rahim <abdul.rahim@myyahoo.com> | 2024-09-23 04:28:18 +0530 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-09-30 09:47:34 +0200 |
commit | 2a94a0898b14f2d5dee10bf36d00ab5e766af94b (patch) | |
tree | 68c707525252548686ac0e683497f54a394d3498 /tools | |
parent | bf36793fa260cb68cc817f311f1f683788261796 (diff) | |
download | linux-stable-2a94a0898b14f2d5dee10bf36d00ab5e766af94b.tar.gz linux-stable-2a94a0898b14f2d5dee10bf36d00ab5e766af94b.tar.bz2 linux-stable-2a94a0898b14f2d5dee10bf36d00ab5e766af94b.zip |
selftest: alsa: check if user has alsa installed
Currently, if alsa development package is not installed on the user's
system then the make command would print a `pagefull` of errors. In
particular one error message is repeated 3 times. This error is returned
by `pkg-config` and since it is not being handeled appropriately,
repeated calls to `pkg-config` prints the same message again.
This patch adds check for alsa package installation. If alsa is not
installed, a short and consize error is returned. Also, it does not
affect the compilation of other tests.
Signed-off-by: Abdul Rahim <abdul.rahim@myyahoo.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://patch.msgid.link/20240922225824.18918-1-abdul.rahim@myyahoo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/alsa/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/alsa/Makefile b/tools/testing/selftests/alsa/Makefile index 25be68025290..944279160fed 100644 --- a/tools/testing/selftests/alsa/Makefile +++ b/tools/testing/selftests/alsa/Makefile @@ -1,5 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 # +ifneq ($(shell pkg-config --exists alsa && echo 0 || echo 1),0) +$(error Package alsa not found, please install alsa development package or \ + add directory containing `alsa.pc` in PKG_CONFIG_PATH) +endif CFLAGS += $(shell pkg-config --cflags alsa) $(KHDR_INCLUDES) LDLIBS += $(shell pkg-config --libs alsa) |