aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderwinlu <[email protected]>2015-09-23 16:57:58 +0200
committerderwinlu <[email protected]>2015-09-26 13:42:01 +0200
commit2e54f1a1fa85937e960081247536cc1dd9bd8843 (patch)
tree2f72cdcb67c527bdbbed7fae2ebce6f6b8a348ab
parenta7f484304415fac07bcfa908b8a74ba4cddc1a5b (diff)
downloaderlang.mk-2e54f1a1fa85937e960081247536cc1dd9bd8843.tar.gz
erlang.mk-2e54f1a1fa85937e960081247536cc1dd9bd8843.tar.bz2
erlang.mk-2e54f1a1fa85937e960081247536cc1dd9bd8843.zip
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.
-rw-r--r--core/erlc.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/erlc.mk b/core/erlc.mk
index ee029e5..b215374 100644
--- a/core/erlc.mk
+++ b/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 \