Check for all missing tools at once

Instead of terminating tool/tool_chain when finding the first
missing tool, this patch runs all checks to completion before
bailing out. This eases finding missing programs, because the
user has to run the script only once to get a list of all missing
software.

Fixes #1046
Fixes #1047
This commit is contained in:
Bjoern Doebel
2014-02-05 22:49:48 +01:00
committed by Christian Helmuth
parent 7008013625
commit 9c9f67d0d6

View File

@@ -94,50 +94,56 @@ AUTOCONF_gcc_4.7.2 = autoconf2.64
AUTOCONF = $(AUTOCONF_gcc_$(GCC_VERSION)) AUTOCONF = $(AUTOCONF_gcc_$(GCC_VERSION))
ifeq ($(AUTOCONF),) # Return $(2) if $(1) is empty, "" else
$(error Unknown autoconf version for GCC $(GCC_VERSION).) check_nonempty_f = $(if $(1),,$(info $(2))$(2))
endif # Return $(3) if $(1) != $(2), "" else
check_equal_f = $(if $(filter $(1),$(2)),,$(info $(3))$(3))
AUTOCONF_OK = $(call check_nonempty_f,$(AUTOCONF),\
Unknown autoconf version for GCC $(GCC_VERSION))
# #
# Check if 'autoconf' is installed # Check if 'autoconf' is installed
# #
ifeq ($(shell which $(AUTOCONF)),) AUTOCONFINST_OK = $(call check_nonempty_f,$(shell which $(AUTOCONF)),\
$(error Need to have '$(AUTOCONF)' installed.) Need to have $(AUTOCONF) installed.)
endif
# #
# Check if 'libncurses' is installed # Check if 'libncurses' is installed
# #
ifneq ($(shell $(LD) -lncurses -e0 -o /tmp/a.out && echo ok),ok) CURSES_OK = $(call check_equal_f,\
$(error Need to have 'libncurses' installed.) $(shell $(LD) -lncurses -e0 -o /tmp/a.out && echo ok),ok,\
endif Need to have 'libncurses' installed.)
# #
# Check if 'texinfo' is installed # Check if 'texinfo' is installed
# #
ifeq ($(shell which texi2pdf),) TEXINFO_OK = $(call check_nonempty_f,$(shell which texi2pdf),\
$(error Need to have 'texinfo' installed.) Need to have 'texinfo' installed.)
endif
# #
# Check if 'wget' is installed # Check if 'wget' is installed
# #
ifeq ($(shell which wget),) WGET_OK = $(call check_nonempty_f,$(shell which wget),\
$(error Need to have 'wget' installed.) Need to have 'wget' installed.)
endif
# #
# Check if 'autogen' is installed # Check if 'autogen' is installed
# #
ifeq ($(shell which autogen)),) AUTOGEN_OK = $(call check_nonempty_f,$(shell which autogen),\
$(error Need to have 'autogen' installed.) Need to have 'autogen' installed.)
endif
# #
# Check if 'gpg' is installed # Check if 'gpg' is installed
# #
ifeq ($(shell which gpg)),) GPG_OK = $(call check_nonempty_f,$(shell which gpg),\
$(error Need to have 'gpg' installed.) Need to have 'gpg' installed.)
TOOLS_OK = $(AUTOCONF_OK) $(AUTOCONFINST_OK) $(CURSES_OK) \
$(TEXINFO_OK) $(WGET_OK) $(AUTOGEN_OK) $(GPG_OK)
ifneq ($(strip $(TOOLS_OK)),)
$(error Please install missing tools.)
endif endif
# #