summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2011-04-05 15:51:03 +0200
committerMichael Brown2011-04-05 15:51:03 +0200
commit7514172b50e5bced48621ab9dfbe72491dd6d53c (patch)
treeae300bc91d20641238c0559cf2f5e58c0647294c /src/Makefile.housekeeping
parent[tcp] Update ts_recent whenever window is advanced (diff)
downloadipxe-7514172b50e5bced48621ab9dfbe72491dd6d53c.tar.gz
ipxe-7514172b50e5bced48621ab9dfbe72491dd6d53c.tar.xz
ipxe-7514172b50e5bced48621ab9dfbe72491dd6d53c.zip
[build] Perform tool checks on each make invocation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 02e4ec11..7d7bbebc 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -88,21 +88,23 @@ cctype:
#
# Check for tools that can cause failed builds
#
-.toolcheck :
- @if $(CC) -v 2>&1 | grep -is 'gcc version 2\.96' > /dev/null; then \
- $(ECHO) 'gcc 2.96 is unsuitable for compiling Etherboot'; \
- $(ECHO) 'Use gcc 2.95 or gcc 3.x instead'; \
- exit 1; \
- fi
- @if [ `perl -e 'use bytes; print chr(255)' | wc -c` = 2 ]; then \
- $(ECHO) 'Your Perl version has a Unicode handling bug'; \
- $(ECHO) 'Execute this command before compiling Etherboot:'; \
- $(ECHO) 'export LANG=$${LANG%.UTF-8}'; \
- exit 1; \
- fi
- @$(TOUCH) $@
-MAKEDEPS += .toolcheck
-VERYCLEANUP += .toolcheck
+
+ifeq ($(CCTYPE),gcc)
+GCC_2_96_BANNER := $(shell $(CC) -v 2>&1 | grep -is 'gcc version 2\.96')
+ifneq ($(GCC_2_96_BANNER),)
+$(warning gcc 2.96 is unsuitable for compiling iPXE)
+$(warning Use gcc 2.95 or a newer version instead)
+$(error Unsuitable build environment found)
+endif
+endif
+
+PERL_UNICODE_CHECK := $(shell $(PERL) -e 'use bytes; print chr(255)' | wc -c)
+ifeq ($(PERL_UNICODE_CHECK),2)
+$(warning Your Perl version has a Unicode handling bug)
+$(warning Execute this command before building iPXE:)
+$(warning export LANG=$${LANG%.UTF-8})
+$(error Unsuitable build environment found)
+endif
###############################################################################
#