diff options
author | Loïc Hoguin <[email protected]> | 2015-05-18 11:25:50 +0300 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-05-18 11:25:50 +0300 |
commit | 3e7c5625f68345659e8e0091d93dc9d78534e5c5 (patch) | |
tree | 6bed7b4f164e54da46468dd2555def02a5681353 /core/deps.mk | |
parent | 003ba8d7dba1d8a6dac4da62ced984e1a77b2125 (diff) | |
download | erlang.mk-3e7c5625f68345659e8e0091d93dc9d78534e5c5.tar.gz erlang.mk-3e7c5625f68345659e8e0091d93dc9d78534e5c5.tar.bz2 erlang.mk-3e7c5625f68345659e8e0091d93dc9d78534e5c5.zip |
Proper fix for NIF code detection when port_specs is used
Adds rafter back to the index.
Diffstat (limited to 'core/deps.mk')
-rw-r--r-- | core/deps.mk | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/core/deps.mk b/core/deps.mk index a69b153..eb552a3 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -244,10 +244,20 @@ define dep_autopatch_rebar.erl ]) end, fun() -> + case filelib:is_dir("$(DEPS_DIR)/$(1)/c_src") of + false -> ok; + true -> + Sources = filelib:fold_files("$(DEPS_DIR)/$(1)/c_src", ".*\\\\.(c|C|cc|cpp)$$$$", true, fun(F, Acc) -> [F|Acc] end, []), + Write(io_lib:format("SOURCES :=~s\n", [[[" ", S] || S <- Sources]])) + end + end(), + fun() -> case lists:keyfind(port_specs, 1, Conf) of - {_, [{Output, _}]} -> + {_, [{Output, Wildcards}]} -> filelib:ensure_dir("$(DEPS_DIR)/$(1)/" ++ Output), - Write("C_SRC_OUTPUT = " ++ Escape(Output) ++ "\n"); + Write("C_SRC_OUTPUT = " ++ Escape(Output) ++ "\n"), + Sources = [[[" ", S] || S <- filelib:wildcard("$(DEPS_DIR)/$(1)/" ++ W)] || W <- Wildcards], + Write(io_lib:format("SOURCES :=~s\n", [Sources])); {_, [First, Second]} -> PortSpec("1", First), PortSpec("2", Second), @@ -285,14 +295,6 @@ define dep_autopatch_rebar.erl _ -> ok end end(), - fun() -> - case filelib:is_dir("$(DEPS_DIR)/$(1)/c_src") of - false -> ok; - true -> - Sources = filelib:fold_files("$(DEPS_DIR)/$(1)/c_src", ".*\\\\.(c|C|cc|cpp)$$$$", true, fun(F, Acc) -> [F|Acc] end, []), - Write(io_lib:format("SOURCES :=~s\n", [[[" ", S] || S <- Sources]])) - end - end(), Write("\n\nrebar_dep: pre-deps deps pre-app app\n"), Write("\npre-deps::\n"), Write("\npre-app::\n"), |