From 28fbb7673a789335992c3c404b724e8a8c5627f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 19 Apr 2017 18:07:03 +0200 Subject: Move external plugin loading at the end of erlang.mk This allows all plugins to append to existing variables and makes it easier to augment the functionality of the core plugins. --- core/plugins.mk | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 core/plugins.mk (limited to 'core/plugins.mk') 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 +# 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)))) -- cgit v1.2.3