Sfoglia il codice sorgente

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

tags/v0.9.3
Michael Brown 17 anni fa
parent
commit
8ad8804f7a
1 ha cambiato i file con 10 aggiunte e 2 eliminazioni
  1. 10
    2
      src/Makefile.housekeeping

+ 10
- 2
src/Makefile.housekeeping Vedi File

@@ -39,6 +39,14 @@ version :
39 39
 	@$(TOUCH) $@
40 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 50
 # Build verbosity
43 51
 #
44 52
 ifeq ($(V),1)
@@ -121,7 +129,7 @@ define obj_template
121 129
 	@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) -DOBJECT=$(4) \
122 130
 		-Wno-error -M $(1) -MT "$(4)_DEPS" -MG -MP | \
123 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 133
 		 '\n\t$$(QM)echo "  [BUILD] $$@"\n' \
126 134
 		 '\n\t$$(RULE_$(3))\n' \
127 135
 		 '\nBOBJS += $$(BIN)/$(4).o\n' \
@@ -368,7 +376,7 @@ define media_template
368 376
 	@$(MKDIR) -p $(dir $(2))
369 377
 	@$(RM) $(2)
370 378
 	@$(TOUCH) $(2)
371
-	@echo -e '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
379
+	@$(ECHO_E) '$$(BIN)/%$(1) : $$(BIN)/%$(1).zbin' \
372 380
 		  '\n\t$$(QM)echo "  [FINISH] $$@"' \
373 381
 		  '\n\t$$(Q)$$(CP) $$< $$@' \
374 382
 		  '\n\t$$(Q)$$(FINALISE_$(1))' \

Loading…
Annulla
Salva