From 724521b68c19f107437db9fa2ee8def6ff604e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 12 May 2017 10:19:24 +0200 Subject: Support plugins local to the application If the application's Makefile specify either: DEP_PLUGINS = $(PROJECT) or e.g.: DEP_PLUGINS = $(PROJECT)/mk/dist.mk then load the plugin from the application instead of a dependency. This helps when you have an application with common Erlang modules and Erlang.mk plugins: your common application can load Erlang.mk plugins exactly like other applications depending on the common application. --- core/deps.mk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index 2c6f6d5..96270a1 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -25,9 +25,13 @@ export REBAR_DEPS_DIR # They both use the core_dep_plugin macro. define core_dep_plugin +ifeq ($(2),$(PROJECT)) +-include $$(patsubst $(PROJECT)/%,%,$(1)) +else -include $(DEPS_DIR)/$(1) $(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ; +endif endef DEP_EARLY_PLUGINS ?= -- cgit v1.2.3