From: Michael Brown Date: Fri, 7 Dec 2007 03:35:32 +0000 (+0000) Subject: Try to fix echo-detection to work on all systems that provide any X-Git-Tag: v0.9.3~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b58fc0baf095b14bd885b8e657c0baa4b449641;p=thirdparty%2Fipxe.git Try to fix echo-detection to work on all systems that provide any suitable "echo -e" substitute. --- diff --git a/src/Makefile b/src/Makefile index 2abf98658..3516d6719 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,6 +9,18 @@ ROMS := MEDIA := NON_AUTO_MEDIA := +# Find a usable "echo -e". +# +ifeq ($(shell echo '\0101'),A) +ECHO := echo +else ifeq ($(shell echo -e '\0101'),A) +ECHO := echo -e +else ifeq ($(shell /bin/echo '\0101'),A) +ECHO := /bin/echo +else ifeq ($(shell /bin/echo -e '\0101'),A) +ECHO := /bin/echo -e +endif + # Grab the central Config file. # MAKEDEPS += Config @@ -66,7 +78,6 @@ noargs : blib $(BIN)/NIC $(BIN)/gpxe.dsk $(BIN)/gpxe.iso $(BIN)/gpxe.usb # Locations of utilities # -ECHO ?= /bin/echo -e HOST_CC ?= gcc CPP ?= gcc -E -Wp,-Wall RM ?= rm -f diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 6db4cea6a..df290b9bb 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -7,6 +7,11 @@ # CLEANUP := $(BIN)/*.* # *.* to avoid catching the "CVS" directory +# Show what we're using for "echo -e" +# +echo : + @$(ECHO) Using "$(ECHO)" to echo + # Version number calculations # VERSION_MAJOR = 0