aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-05-12 23:03:36 +0300
committerLoïc Hoguin <[email protected]>2015-05-12 23:03:36 +0300
commit08fcf4b85cb62af57008bfe5ad24143baecd8127 (patch)
tree9f1506d9cfebb7e49677961b75c12bb1e6572b3a
parent418969e804841f3f9724935dc9affc80c58d0f57 (diff)
downloaderlang.mk-08fcf4b85cb62af57008bfe5ad24143baecd8127.tar.gz
erlang.mk-08fcf4b85cb62af57008bfe5ad24143baecd8127.tar.bz2
erlang.mk-08fcf4b85cb62af57008bfe5ad24143baecd8127.zip
More build improvements
* Generate configure if there is only configure.ac * Don't touch the .app/.app.src if neither exists
-rw-r--r--core/deps.mk24
1 files changed, 16 insertions, 8 deletions
diff --git a/core/deps.mk b/core/deps.mk
index 1e58a72..28eff93 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -140,14 +140,18 @@ endef
define dep_autopatch_appsrc.erl
AppSrcOut = "$(DEPS_DIR)/$(1)/src/$(1).app.src",
AppSrcIn = case filelib:is_regular(AppSrcOut) of false -> "$(DEPS_DIR)/$(1)/ebin/$(1).app"; true -> AppSrcOut end,
- fun() ->
- {ok, [{application, $(1), L}]} = file:consult(AppSrcIn),
- L2 = case lists:keyfind(modules, 1, L) of {_, _} -> L; false -> [{modules, []}|L] end,
- L3 = case lists:keyfind(vsn, 1, L2) of {vsn, git} -> lists:keyreplace(vsn, 1, L2, {vsn, "git"}); _ -> L2 end,
- ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}]))
- end(),
- case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) end,
- halt().
+ case filelib:is_regular(AppSrcIn) of
+ false -> ok;
+ true ->
+ fun() ->
+ {ok, [{application, $(1), L}]} = file:consult(AppSrcIn),
+ L2 = case lists:keyfind(modules, 1, L) of {_, _} -> L; false -> [{modules, []}|L] end,
+ L3 = case lists:keyfind(vsn, 1, L2) of {vsn, git} -> lists:keyreplace(vsn, 1, L2, {vsn, "git"}); _ -> L2 end,
+ ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}]))
+ end(),
+ case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) end
+ end,
+ halt()
endef
define dep_fetch
@@ -197,6 +201,10 @@ else
endif
endif
endif
+ @if [ -f $(DEPS_DIR)/$(1)/configure.ac ]; then \
+ echo " AUTO " $(1); \
+ cd $(DEPS_DIR)/$(1) && autoreconf -vif; \
+ fi
-@if [ -f $(DEPS_DIR)/$(1)/configure ]; then \
echo " CONF " $(1); \
cd $(DEPS_DIR)/$(1) && ./configure; \