diff options
author | Yann Gautier <yann.gautier@st.com> | 2023-04-24 13:38:12 +0200 |
---|---|---|
committer | Yann Gautier <yann.gautier@st.com> | 2023-05-03 18:02:09 +0100 |
commit | 1369fb82c8e809c1a59a0d99184dbfd2d0b81afa (patch) | |
tree | c96291f768d3a12971dc2b139442dc9dac40cfc5 | |
parent | 4d32f9138d61719bbaab57fdd853877a7e06b1cd (diff) | |
download | arm-trusted-firmware-1369fb82c8e809c1a59a0d99184dbfd2d0b81afa.tar.gz |
build!: check boolean flags are not empty
For numeric flags, there is a check for the value to be set. Do the same
for boolean flags. This avoids issues where a flag is defined but
without a value, leading to potential unexpected behaviors.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ib00da2784339471058887e93434d96ccba2aebb2
-rw-r--r-- | make_helpers/build_macros.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/make_helpers/build_macros.mk b/make_helpers/build_macros.mk index 9ca6bdf0c..cb204a824 100644 --- a/make_helpers/build_macros.mk +++ b/make_helpers/build_macros.mk @@ -73,6 +73,7 @@ endef # Convenience function for verifying option has a boolean value # $(eval $(call assert_boolean,FOO)) will assert FOO is 0 or 1 define assert_boolean + $(if $($(1)),,$(error $(1) must not be empty)) $(if $(filter-out 0 1,$($1)),$(error $1 must be boolean)) endef |