util/abuild: Check functions directly instead of with $?

Change-Id: I5d28e8f9533602a2ffbacd858c7380af08b56788
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87376
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Martin Roth 2025-04-20 14:11:58 -06:00 committed by Matt DeVillier
commit a8e1113e3b

View file

@ -535,24 +535,21 @@ build_config()
fi
if [[ "${clang}" = true ]]; then
check_config "${build_dir}" "clang" "CONFIG_COMPILER_LLVM_CLANG=y"
if [[ $? -ne 0 ]]; then
if ! check_config "${build_dir}" "clang" "CONFIG_COMPILER_LLVM_CLANG=y"; then
printf "%s doesn't support clang, skipping.\n" "${MAINBOARD}"
return
fi
fi
if [[ -n "${skipconfig_set}" ]]; then
check_config "${build_dir}" "config value" "CONFIG_${skipconfig_set}=y" negate
if [[ $? -ne 0 ]]; then
if ! check_config "${build_dir}" "config value" "CONFIG_${skipconfig_set}=y" negate; then
printf "%s has %s set. Skipping at user's request.\n" "${MAINBOARD}" "${skipconfig_set}"
return
fi
fi
if [[ -n "${skipconfig_unset}" ]]; then
check_config "${build_dir}" "config value" "CONFIG_${skipconfig_unset}=y"
if [[ $? -ne 0 ]]; then
if ! check_config "${build_dir}" "config value" "CONFIG_${skipconfig_unset}=y"; then
printf "%s does not have %s set. Skipping at user's request.\n" "${MAINBOARD}" "${skipconfig_unset}"
return
fi