Add a check to ensure the proper utilities are installed before
authorEric Andersen <andersen@codepoet.org>
Fri, 6 Feb 2004 10:16:11 +0000 (10:16 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 6 Feb 2004 10:16:11 +0000 (10:16 -0000)
trying to build binutils, lest folks get cryptic error msgs later.
 -Erik

make/binutils-uclibc.mk

index 326c4215535be05b50f24e19fd50cbe12a9b821c..38318b8875e82c4444a0e5c2ce2f7fec6d45ca98 100644 (file)
@@ -45,7 +45,21 @@ $(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured
 $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump 
        $(MAKE) $(JLEVEL) -C $(BINUTILS_DIR1) install
 
-binutils: $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld
+binutils-dependancies:
+       @if [ ! -x /usr/bin/bison ] ; then \
+               echo -e "\n\nYou must install 'bison' on your build machine\n"; \
+               exit 1; \
+       fi;
+       @if [ ! -x /usr/bin/flex ] ; then \
+               echo -e "\n\nYou must install 'flex' on your build machine\n"; \
+               exit 1; \
+       fi;
+       @if [ ! -x /usr/bin/msgfmt ] ; then \
+               echo -e "\n\nYou must install 'gettext' on your build machine\n"; \
+               exit 1; \
+       fi;
+
+binutils: binutils-dependancies $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld
 
 binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE)