aboutsummaryrefslogtreecommitdiffstats
path: root/core/plugins.mk
diff options
context:
space:
mode:
Diffstat (limited to 'core/plugins.mk')
-rw-r--r--core/plugins.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/plugins.mk b/core/plugins.mk
new file mode 100644
index 0000000..73f2d47
--- /dev/null
+++ b/core/plugins.mk
@@ -0,0 +1,17 @@
+# Copyright (c) 2013-2017, Loïc Hoguin <[email protected]>
+# This file is part of erlang.mk and subject to the terms of the ISC License.
+
+# External plugins.
+
+DEP_PLUGINS ?=
+
+define core_dep_plugin
+-include $(DEPS_DIR)/$(1)
+
+$(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ;
+endef
+
+$(foreach p,$(DEP_PLUGINS),\
+ $(eval $(if $(findstring /,$p),\
+ $(call core_dep_plugin,$p,$(firstword $(subst /, ,$p))),\
+ $(call core_dep_plugin,$p/plugins.mk,$p))))