summaryrefslogtreecommitdiff
path: root/rabbitmq-components.mk
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-14 11:53:54 +0200
committerJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-20 11:10:48 +0200
commit8d0c8dad7da9d9b2d642874a70fcbeb44f68be54 (patch)
tree611e92c004cb823cdc2849e26bb410fe7452a95e /rabbitmq-components.mk
parent04ada4583d976acb38419f15a2af90c29e443897 (diff)
downloadrabbitmq-server-git-8d0c8dad7da9d9b2d642874a70fcbeb44f68be54.tar.gz
Update rabbitmq-components.mk
Diffstat (limited to 'rabbitmq-components.mk')
-rw-r--r--rabbitmq-components.mk34
1 files changed, 34 insertions, 0 deletions
diff --git a/rabbitmq-components.mk b/rabbitmq-components.mk
index 2c5f845f53..cffa328e35 100644
--- a/rabbitmq-components.mk
+++ b/rabbitmq-components.mk
@@ -5,6 +5,10 @@ ifeq ($(.DEFAULT_GOAL),)
.DEFAULT_GOAL = all
endif
+# --------------------------------------------------------------------
+# RabbitMQ components.
+# --------------------------------------------------------------------
+
# For RabbitMQ repositories, we want to checkout branches which match
# the parent project. For instance, if the parent project is on a
# release tag, dependencies must be on the same release tag. If the
@@ -74,6 +78,36 @@ define dep_fetch_git_rmq
1>&2 && false) )
endef
+# --------------------------------------------------------------------
+# Run a RabbitMQ node (moved from rabbitmq-run.mk as a workaround).
+# --------------------------------------------------------------------
+
+# Add "rabbit" to the build dependencies when the user wants to start a
+# broker.
+#
+# NOTE: This should belong to rabbitmq-run.mk. Unfortunately, it is
+# loaded *after* erlang.mk which is too late to add a dependency. That's
+# why rabbitmq-components.mk knows the list of targets which start a
+# broker and add "rabbit" to the dependencies in this case.
+
+ifneq ($(PROJECT),rabbit)
+ifeq ($(filter rabbit,$(DEPS)),)
+RUN_RMQ_TARGETS = run-broker \
+ run-background-broker \
+ run-node \
+ run-background-node \
+ start-background-node
+
+ifneq ($(filter $(RUN_RMQ_TARGETS),$(MAKECMDGOALS)),)
+BUILD_DEPS += rabbit
+endif
+endif
+endif
+
+# --------------------------------------------------------------------
+# rabbitmq-components.mk checks.
+# --------------------------------------------------------------------
+
ifeq ($(PROJECT),rabbit_common)
else ifeq ($(IS_DEP),1)
else