aboutsummaryrefslogtreecommitdiffstats
path: root/core/erlc.mk
diff options
context:
space:
mode:
authornevar <[email protected]>2016-08-06 00:12:26 +0700
committerLoïc Hoguin <[email protected]>2016-10-19 17:51:57 +0200
commitfc7f6acd00331b09217fe733b89c620771fdabd5 (patch)
treefa7340acdaf4e76e57748bf70f5e7e782f5660c4 /core/erlc.mk
parent01ed1866afdbdfaa966bf5be5aab30d6525aa962 (diff)
downloaderlang.mk-fc7f6acd00331b09217fe733b89c620771fdabd5.tar.gz
erlang.mk-fc7f6acd00331b09217fe733b89c620771fdabd5.tar.bz2
erlang.mk-fc7f6acd00331b09217fe733b89c620771fdabd5.zip
Add PROJECT_ENV
Fix #587
Diffstat (limited to 'core/erlc.mk')
-rw-r--r--core/erlc.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/erlc.mk b/core/erlc.mk
index 24b78d2..ed9aa88 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -67,7 +67,8 @@ define app_file
{id$(comma)$(space)"$(1)"}$(comma))
{modules, [$(call comma_list,$(2))]},
{registered, []},
- {applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS))]}
+ {applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS))]},
+ {env, $(subst \,\\,$(PROJECT_ENV))}
]}.
endef
else
@@ -79,7 +80,8 @@ define app_file
{modules, [$(call comma_list,$(2))]},
{registered, [$(call comma_list,$(PROJECT)_sup $(PROJECT_REGISTERED))]},
{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(DEPS))]},
- {mod, {$(PROJECT_MOD), []}}
+ {mod, {$(PROJECT_MOD), []}},
+ {env, $(subst \,\\,$(PROJECT_ENV))}
]}.
endef
endif
@@ -241,7 +243,7 @@ ebin/$(PROJECT).app:: $(ERL_FILES) $(CORE_FILES) $(wildcard src/$(PROJECT).app.s
$(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename \
$(filter-out $(ERLC_EXCLUDE_PATHS),$(ERL_FILES) $(CORE_FILES) $(BEAM_FILES)))))))
ifeq ($(wildcard src/$(PROJECT).app.src),)
- $(app_verbose) printf "$(subst $(newline),\n,$(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 \