Browse Source

retain newlines in generated .app file

Replacing $(newline) occurances with \n before passing it to printf
instead of echo ensures valid output accross different platforms.
derwinlu 9 years ago
parent
commit
2e54f1a1fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/erlc.mk

+ 1 - 1
core/erlc.mk

@@ -201,7 +201,7 @@ ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES)
 	$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
 		$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES)))))))
 ifeq ($(wildcard src/$(PROJECT).app.src),)
-	$(app_verbose) echo "$(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES))))" \
+	$(app_verbose) printf "$(subst $(newline),\n,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES))))" \
 		> ebin/$(PROJECT).app
 else
 	$(verbose) if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \