]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Try to fix echo-detection to work on all systems that provide any
authorMichael Brown <mcb30@etherboot.org>
Fri, 7 Dec 2007 03:35:32 +0000 (03:35 +0000)
committerMichael Brown <mcb30@etherboot.org>
Fri, 7 Dec 2007 03:35:32 +0000 (03:35 +0000)
suitable "echo -e" substitute.

src/Makefile
src/Makefile.housekeeping

index 2abf9865838edc6a6b9787bfe6697dbfd2331249..3516d67197dcfd5e4cab095744a6a73beb643bc8 100644 (file)
@@ -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
index 6db4cea6aea41bb99a4fe30b0bb62a3aaaff10d7..df290b9bb30a7922e5ee05f21abcbfac3c9538d7 100644 (file)
@@ -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