Browse Source

Fix building on distros which use dash as the default shell.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
8ad8804f7a
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      src/Makefile.housekeeping

+ 10
- 2
src/Makefile.housekeeping View File

39
 	@$(TOUCH) $@
39
 	@$(TOUCH) $@
40
 VERYCLEANUP	+= .toolcheck
40
 VERYCLEANUP	+= .toolcheck
41
 
41
 
42
+# Check for correct syntax for echo -e
43
+#
44
+ifeq ($(shell echo '\0101'),A)
45
+ECHO_E = echo
46
+else
47
+ECHO_E = echo -e
48
+endif
49
+
42
 # Build verbosity
50
 # Build verbosity
43
 #
51
 #
44
 ifeq ($(V),1)
52
 ifeq ($(V),1)
121
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
129
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
122
 		-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
130
 		-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
123
 		sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
131
 		sed 's/_DEPS\s*:/_DEPS =/' >> $(2)
124
-	@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
132
+	@$(ECHO_E) '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
125
 		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
133
 		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
126
 		 '\n\t$$(RULE_$(3))\n' \
134
 		 '\n\t$$(RULE_$(3))\n' \
127
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
135
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
368
 	@$(MKDIR) -p $(dir $(2))
376
 	@$(MKDIR) -p $(dir $(2))
369
 	@$(RM) $(2)
377
 	@$(RM) $(2)
370
 	@$(TOUCH) $(2)
378
 	@$(TOUCH) $(2)
371
-	@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
379
+	@$(ECHO_E) '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
372
 		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
380
 		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
373
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
381
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
374
 		  '\n\t$$(Q)$$(FINALISE_$(1))' \
382
 		  '\n\t$$(Q)$$(FINALISE_$(1))' \

Loading…
Cancel
Save