From 5a787cdafe2bcab1db034abd26958b04baac7a33 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 5 Mar 2021 21:33:48 +0100 Subject: [PATCH] - rework toolcheck, bashcheck --- make/buildsystem-prerequisites.mk | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/make/buildsystem-prerequisites.mk b/make/buildsystem-prerequisites.mk index f25b6fdb..ed90cf9c 100644 --- a/make/buildsystem-prerequisites.mk +++ b/make/buildsystem-prerequisites.mk @@ -35,17 +35,15 @@ TOOLCHECK += find-tic TOOLCHECK += find-yacc find-%: - @TOOL=$(patsubst find-%,%,$(@)); \ - type -p $$TOOL >/dev/null || { echo "required tool $$TOOL missing."; false; } - -toolcheck: $(TOOLCHECK) - @echo "All required tools seem to be installed." - @make bashcheck + @TOOL=$(patsubst find-%,%,$(@)); type -p $$TOOL >/dev/null || \ + { $(call MESSAGE_RED,"Warning",": required tool $$TOOL missing."); false; } bashcheck: - @if test "$(subst /bin/,,$(shell readlink /bin/sh))" != "bash"; then \ - @$(call MESSAGE_RED,"Warning",": /bin/sh is not linked to bash"); \ - fi + @test "$(subst /bin/,,$(shell readlink /bin/sh))" == "bash" || \ + { $(call MESSAGE_RED,"Warning",": /bin/sh is not linked to bash"); false; } + +toolcheck: bashcheck $(TOOLCHECK) + @$(call MESSAGE_GREEN,"All required tools seem to be installed.") # -----------------------------------------------------------------------------