Using helper variables has two issues:
- They contaminate the global namespace of the main build script.
- They can be used as
set(var)
, effectively exposing a cache variablevar
, which makes the toolchain file susceptible to the build environment.
The depends/Makefile
can generate values with “not-set” semantics as empty strings or strings containing only spaces. For example:https://github.com/bitcoin/bitcoin/blob/2638fdb4f934be96b7c798dbac38ea5ab8a6374a/depends/Makefile#L157
Therefore, MATCHES
must be used rather than STREQUAL
.