Browse Source

Try to fix echo-detection to work on all systems that provide any

suitable "echo -e" substitute.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
3b58fc0baf
2 changed files with 17 additions and 1 deletions
  1. 12
    1
      src/Makefile
  2. 5
    0
      src/Makefile.housekeeping

+ 12
- 1
src/Makefile View File

9
 MEDIA		:=
9
 MEDIA		:=
10
 NON_AUTO_MEDIA	:=
10
 NON_AUTO_MEDIA	:=
11
 
11
 
12
+# Find a usable "echo -e".
13
+#
14
+ifeq ($(shell echo '\0101'),A)
15
+ECHO		:= echo
16
+else ifeq ($(shell echo -e '\0101'),A)
17
+ECHO		:= echo -e
18
+else ifeq ($(shell /bin/echo '\0101'),A)
19
+ECHO		:= /bin/echo
20
+else ifeq ($(shell /bin/echo -e '\0101'),A)
21
+ECHO		:= /bin/echo -e
22
+endif
23
+
12
 # Grab the central Config file.
24
 # Grab the central Config file.
13
 #
25
 #
14
 MAKEDEPS	+= Config
26
 MAKEDEPS	+= Config
66
 
78
 
67
 # Locations of utilities
79
 # Locations of utilities
68
 #
80
 #
69
-ECHO		?= /bin/echo -e
70
 HOST_CC		?= gcc
81
 HOST_CC		?= gcc
71
 CPP		?= gcc -E -Wp,-Wall
82
 CPP		?= gcc -E -Wp,-Wall
72
 RM		?= rm -f
83
 RM		?= rm -f

+ 5
- 0
src/Makefile.housekeeping View File

7
 #
7
 #
8
 CLEANUP	:= $(BIN)/*.* # *.* to avoid catching the "CVS" directory
8
 CLEANUP	:= $(BIN)/*.* # *.* to avoid catching the "CVS" directory
9
 
9
 
10
+# Show what we're using for "echo -e"
11
+#
12
+echo :
13
+	@$(ECHO) Using "$(ECHO)" to echo
14
+
10
 # Version number calculations 
15
 # Version number calculations 
11
 #
16
 #
12
 VERSION_MAJOR	= 0
17
 VERSION_MAJOR	= 0

Loading…
Cancel
Save