aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-11-30 13:49:16 +0100
committerLoïc Hoguin <[email protected]>2018-11-30 13:49:16 +0100
commitbfd3035ee9a0603ca202ef1d702c241d00b3adf3 (patch)
tree96590f4236f011259794bf942ba3bddc4a443f43 /core
parent8e655f1ada855bcd31afec078c1855e315cafeda (diff)
downloaderlang.mk-bfd3035ee9a0603ca202ef1d702c241d00b3adf3.tar.gz
erlang.mk-bfd3035ee9a0603ca202ef1d702c241d00b3adf3.tar.bz2
erlang.mk-bfd3035ee9a0603ca202ef1d702c241d00b3adf3.zip
Correct expanding of shell variables in autopatch
The $(...) form was improperly converted. In addition it must be changed into a $(shell ...) form.
Diffstat (limited to 'core')
-rw-r--r--core/deps.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 6b7513e..0efde17 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -379,9 +379,10 @@ define dep_autopatch_rebar.erl
end || H <- Hooks]
end
end(),
- ShellToMk = fun(V) ->
- re:replace(re:replace(V, "(\\\\$$)(\\\\w*)", "\\\\1(\\\\2)", [global]),
- "-Werror\\\\b", "", [{return, list}, global])
+ ShellToMk = fun(V0) ->
+ V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]),
+ V = re:replace(V1, "(\\\\$$$$)(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]),
+ re:replace(V, "-Werror\\\\b", "", [{return, list}, global])
end,
PortSpecs = fun() ->
case lists:keyfind(port_specs, 1, Conf) of