diff options
author | Loïc Hoguin <[email protected]> | 2015-05-18 10:13:51 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-05-18 10:13:51 +0300 |
commit | 0441997539bc7e0c27b0109bab4b62217e1570fe (patch) | |
tree | d9d65ed264f9c77b05ae0aaa9fa092aa20b6366b /core | |
parent | d34071864a40edf423427a40da280d234eac2891 (diff) | |
download | erlang.mk-0441997539bc7e0c27b0109bab4b62217e1570fe.tar.gz erlang.mk-0441997539bc7e0c27b0109bab4b62217e1570fe.tar.bz2 erlang.mk-0441997539bc7e0c27b0109bab4b62217e1570fe.zip |
Add platform_define support for erl_opts
Fixes jsx maps support.
Diffstat (limited to 'core')
-rw-r--r-- | core/deps.mk | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/deps.mk b/core/deps.mk index 131e3b9..c0f7887 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -156,6 +156,12 @@ define dep_autopatch_rebar.erl lists:foreach(fun ({d, D}) -> Write("ERLC_OPTS += -D" ++ atom_to_list(D) ++ "=1\n"); + ({platform_define, Regex, D}) -> + case re:run("$(PLATFORM)", Regex, [{capture, none}]) of + nomatch -> ok; + match -> + Write("ERLC_OPTS += -D" ++ atom_to_list(D) ++ "=1\n") + end; ({parse_transform, PT}) -> Write("ERLC_OPTS += +'{parse_transform, " ++ atom_to_list(PT) ++ "}'\n"); (_) -> ok |