From 26915c14b7c6861c9364d7b3c38470c27612be3a Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Wed, 4 Jan 2012 20:03:08 +0100 Subject: [PATCH] Add santity checks in 'tool/tool_chain', fix #62 In addition to autogen and autoconf, the tool-chain build script requires ncurses (for building GDB), wget (to download the tool-chain source code), and texinfo. Let the tool check if these packages are installed instead of failing later during the build. --- tool/tool_chain | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/tool/tool_chain b/tool/tool_chain index c7e951852..bfc5157d6 100755 --- a/tool/tool_chain +++ b/tool/tool_chain @@ -96,12 +96,39 @@ ifeq ($(AUTOCONF),) $(error Unknown autoconf version for GCC $(GCC_VERSION).) endif +# +# Check if 'autoconf' is installed +# ifeq ($(shell which $(AUTOCONF)),) -$(error Need to have $(AUTOCONF) installed.) +$(error Need to have '$(AUTOCONF)' installed.) endif +# +# Check if 'libncurses' is installed +# +ifneq ($(shell $(LD) -lncurses -e0 -o /tmp/a.out && echo ok),ok) +$(error Need to have 'libncurses' installed.) +endif + +# +# Check if 'texinfo' is installed +# +ifeq ($(shell which texi2pdf),) +$(error Need to have 'texinfo' installed.) +endif + +# +# Check if 'wget' is installed +# +ifeq ($(shell which wget),) +$(error Need to have 'wget' installed.) +endif + +# +# Check if 'autogen' is installed +# ifeq ($(shell which autogen)),) -$(error Need to have autogen installed.) +$(error Need to have 'autogen' installed.) endif #