aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-12-07 03:35:32 +0000
committerMichael Brown <mcb30@etherboot.org>2007-12-07 03:35:32 +0000
commit3b58fc0baf095b14bd885b8e657c0baa4b449641 (patch)
tree409b9b0947b7c7d28b1668d0d04b9cf0a08c04e6 /src/Makefile
parent1949641d102b0fdc8d4314abaee9ba055481fcc0 (diff)
downloadipxe-3b58fc0baf095b14bd885b8e657c0baa4b449641.tar.gz
Try to fix echo-detection to work on all systems that provide any
suitable "echo -e" substitute.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile
index 2abf9865..3516d671 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