summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-08-27 14:57:11 +0200
committerJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-20 11:10:48 +0200
commit10bf6e442bdfd2cd0604181f21ad4840321568e3 (patch)
tree901abcc4cb535911c11f48936431bd984367da49
parent0e1c78b3beb6a6c4ce867d751912c5cd1f84e2fc (diff)
downloadrabbitmq-server-git-10bf6e442bdfd2cd0604181f21ad4840321568e3.tar.gz
Update erlang.mk
-rw-r--r--erlang.mk48
1 files changed, 32 insertions, 16 deletions
diff --git a/erlang.mk b/erlang.mk
index 99b0752a6b..fd33028587 100644
--- a/erlang.mk
+++ b/erlang.mk
@@ -16,7 +16,7 @@
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
-ERLANG_MK_VERSION = 1.2.0-646-g8f925a4-dirty
+ERLANG_MK_VERSION = 1.2.0-653-gd3d9bb1
# Core configuration.
@@ -135,7 +135,7 @@ endef
# Adding erlang.mk to make Erlang scripts who call init:get_plain_arguments() happy.
define erlang
-$(ERL) -pz $(ERLANG_MK_TMP)/rebar/ebin -eval "$(subst $(newline),,$(subst ",\",$(1)))" -- erlang.mk
+$(ERL) $(2) -pz $(ERLANG_MK_TMP)/rebar/ebin -eval "$(subst $(newline),,$(subst ",\",$(1)))" -- erlang.mk
endef
ifeq ($(shell which wget 2>/dev/null | wc -l), 1)
@@ -3139,6 +3139,14 @@ pkg_rfc4627_jsonrpc_fetch = git
pkg_rfc4627_jsonrpc_repo = https://github.com/tonyg/erlang-rfc4627
pkg_rfc4627_jsonrpc_commit = master
+PACKAGES += riak_control
+pkg_riak_control_name = riak_control
+pkg_riak_control_description = Webmachine-based administration interface for Riak.
+pkg_riak_control_homepage = https://github.com/basho/riak_control
+pkg_riak_control_fetch = git
+pkg_riak_control_repo = https://github.com/basho/riak_control
+pkg_riak_control_commit = master
+
PACKAGES += riak_core
pkg_riak_core_name = riak_core
pkg_riak_core_description = Distributed systems infrastructure used by Riak.
@@ -5631,6 +5639,8 @@ ifeq ($(findstring erlydtl,$(ERLANG_MK_DISABLE_PLUGINS)),)
# Configuration.
DTL_FULL_PATH ?= 0
+DTL_PATH ?= templates/
+DTL_SUFFIX ?= _dtl
# Verbosity.
@@ -5639,22 +5649,28 @@ dtl_verbose = $(dtl_verbose_$(V))
# Core targets.
-define compile_erlydtl
- $(dtl_verbose) $(ERL) -pa ebin/ $(DEPS_DIR)/erlydtl/ebin/ -eval ' \
- Compile = fun(F) -> \
- S = fun (1) -> re:replace(filename:rootname(string:sub_string(F, 11), ".dtl"), "/", "_", [{return, list}, global]); \
- (0) -> filename:basename(F, ".dtl") \
- end, \
- Module = list_to_atom(string:to_lower(S($(DTL_FULL_PATH))) ++ "_dtl"), \
- {ok, _} = erlydtl:compile(F, Module, [{out_dir, "ebin/"}, return_errors, {doc_root, "templates"}]) \
- end, \
- _ = [Compile(F) || F <- string:tokens("$(1)", " ")], \
- halt().'
+define erlydtl_compile.erl
+ [begin
+ Module0 = case $(DTL_FULL_PATH) of
+ 0 ->
+ filename:basename(F, ".dtl");
+ 1 ->
+ "$(DTL_PATH)" ++ F2 = filename:rootname(F, ".dtl"),
+ re:replace(F2, "/", "_", [{return, list}, global])
+ end,
+ Module = list_to_atom(string:to_lower(Module0) ++ "$(DTL_SUFFIX)"),
+ case erlydtl:compile(F, Module, [{out_dir, "ebin/"}, return_errors, {doc_root, "templates"}]) of
+ ok -> ok;
+ {ok, _} -> ok
+ end
+ end || F <- string:tokens("$(1)", " ")],
+ halt().
endef
ifneq ($(wildcard src/),)
-ebin/$(PROJECT).app:: $(sort $(call core_find,templates/,*.dtl))
- $(if $(strip $?),$(call compile_erlydtl,$?))
+ebin/$(PROJECT).app:: $(sort $(call core_find,$(DTL_PATH),*.dtl))
+ $(if $(strip $?),\
+ $(dtl_verbose) $(call erlang,$(call erlydtl_compile.erl,$?,-pa ebin/ $(DEPS_DIR)/erlydtl/ebin/)))
endif
endif # ERLANG_MK_DISABLE_PLUGINS
@@ -5897,7 +5913,7 @@ endif # ERLANG_MK_DISABLE_PLUGINS
ifeq ($(findstring triq,$(ERLANG_MK_DISABLE_PLUGINS)),)
-ifneq ($(wildcard $(DEPS_DIR)/triq),)
+ifeq ($(filter triq,$(DEPS) $(TEST_DEPS)),triq)
.PHONY: triq
# Targets.