aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-01-08 11:00:41 +0100
committerLoïc Hoguin <[email protected]>2016-01-08 11:00:41 +0100
commit914ee6f4f1b58bb4b68756e302e5b3fbd21874ae (patch)
tree66eeed2c5393f6cd59205f9e17922d016c6fbb45
parent250b348c929ec5cadc96eb513afa72f9877a953b (diff)
downloaderlang.mk-914ee6f4f1b58bb4b68756e302e5b3fbd21874ae.tar.gz
erlang.mk-914ee6f4f1b58bb4b68756e302e5b3fbd21874ae.tar.bz2
erlang.mk-914ee6f4f1b58bb4b68756e302e5b3fbd21874ae.zip
Add a function to convert ERLC_OPTS to an Erlang list
For easier reusability in Erlang.mk and plugins.
-rw-r--r--core/compat.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/compat.mk b/core/compat.mk
index f936768..c7e61fd 100644
--- a/core/compat.mk
+++ b/core/compat.mk
@@ -14,11 +14,14 @@ $(if $(filter-out -Werror,$1),\
$(shell echo $1 | cut -b 2-)))
endef
+define compat_erlc_opts_to_list
+ [$(call comma_list,$(foreach o,$(call compat_prepare_erlc_opts,$1),$(call compat_convert_erlc_opts,$o)))]
+endef
+
define compat_rebar_config
{deps, [$(call comma_list,$(foreach d,$(DEPS),\
{$(call dep_name,$d),".*",{git,"$(call dep_repo,$d)","$(call dep_commit,$d)"}}))]}.
-{erl_opts, [$(call comma_list,$(foreach o,$(call compat_prepare_erlc_opts,$(ERLC_OPTS)),\
- $(call compat_convert_erlc_opts,$o)))]}.
+{erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.
endef
$(eval _compat_rebar_config = $$(compat_rebar_config))