prereq-build: add check for true and false

Some uses cases, like with autotools, need a path for 'true'
if we use them to force something to skip.

This will work by default on Linux hosts,
and require MacOS hosts to get coreutils,
which is currently installed in the CI
for 'macos-latest' host.

In the future, prereq stage can be reworked
to search for the actual binary
instead of relying on env.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
This commit is contained in:
Michael Pratt
2023-04-20 12:31:16 -04:00
committed by Christian Marangi
parent 0c117e1f6c
commit ffd7c05aa7
2 changed files with 15 additions and 0 deletions

View File

@@ -8,6 +8,13 @@ include $(INCLUDE_DIR)/prereq.mk
SHELL:=sh
PKG_NAME:=Build dependency
$(eval $(call TestHostCommand,true, \
Please install GNU 'coreutils', \
$(TRUE)))
$(eval $(call TestHostCommand,false, \
Please install GNU 'coreutils', \
$(FALSE); [ $$$$$$$$? = 1 ] && $(TRUE)))
# Required for the toolchain
$(eval $(call TestHostCommand,working-make, \