mirror of https://github.com/ipxe/ipxe.git
[build] Perform tool checks on each make invocation
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/5/head
parent
c4369eb6c2
commit
7514172b50
|
@ -88,21 +88,23 @@ cctype:
|
||||||
#
|
#
|
||||||
# Check for tools that can cause failed builds
|
# Check for tools that can cause failed builds
|
||||||
#
|
#
|
||||||
.toolcheck :
|
|
||||||
@if $(CC) -v 2>&1 | grep -is 'gcc version 2\.96' > /dev/null; then \
|
ifeq ($(CCTYPE),gcc)
|
||||||
$(ECHO) 'gcc 2.96 is unsuitable for compiling Etherboot'; \
|
GCC_2_96_BANNER := $(shell $(CC) -v 2>&1 | grep -is 'gcc version 2\.96')
|
||||||
$(ECHO) 'Use gcc 2.95 or gcc 3.x instead'; \
|
ifneq ($(GCC_2_96_BANNER),)
|
||||||
exit 1; \
|
$(warning gcc 2.96 is unsuitable for compiling iPXE)
|
||||||
fi
|
$(warning Use gcc 2.95 or a newer version instead)
|
||||||
@if [ `perl -e 'use bytes; print chr(255)' | wc -c` = 2 ]; then \
|
$(error Unsuitable build environment found)
|
||||||
$(ECHO) 'Your Perl version has a Unicode handling bug'; \
|
endif
|
||||||
$(ECHO) 'Execute this command before compiling Etherboot:'; \
|
endif
|
||||||
$(ECHO) 'export LANG=$${LANG%.UTF-8}'; \
|
|
||||||
exit 1; \
|
PERL_UNICODE_CHECK := $(shell $(PERL) -e 'use bytes; print chr(255)' | wc -c)
|
||||||
fi
|
ifeq ($(PERL_UNICODE_CHECK),2)
|
||||||
@$(TOUCH) $@
|
$(warning Your Perl version has a Unicode handling bug)
|
||||||
MAKEDEPS += .toolcheck
|
$(warning Execute this command before building iPXE:)
|
||||||
VERYCLEANUP += .toolcheck
|
$(warning export LANG=$${LANG%.UTF-8})
|
||||||
|
$(error Unsuitable build environment found)
|
||||||
|
endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue