Browse Source

Add RABBITMQ_SERVER_PATCH for rabbitmq-server support

Loïc Hoguin 10 years ago
parent
commit
7c2fa2b68e
2 changed files with 19 additions and 4 deletions
  1. 14 4
      core/deps.mk
  2. 5 0
      test/Makefile

+ 14 - 4
core/deps.mk

@@ -529,10 +529,20 @@ endif
 	fi
 ifeq ($(filter $(1),$(NO_AUTOPATCH)),)
 	@if [ "$(RABBITMQ_CLIENT_PATCH)" ]; then \
-		echo " PATCH  Downloading extra RabbitMQ repositories..."; \
-		git clone https://github.com/rabbitmq/rabbitmq-codegen.git $(DEPS_DIR)/rabbitmq-codegen; \
-		git clone https://github.com/rabbitmq/rabbitmq-server.git $(DEPS_DIR)/rabbit; \
-		ln -s $(DEPS_DIR)/rabbit $(DEPS_DIR)/rabbitmq-server; \
+		if [ ! -d $(DEPS_DIR)/rabbitmq-codegen ]; then \
+			echo " PATCH  Downloading rabbitmq-codegen"; \
+			git clone https://github.com/rabbitmq/rabbitmq-codegen.git $(DEPS_DIR)/rabbitmq-codegen; \
+		fi; \
+		if [ ! -d $(DEPS_DIR)/rabbit ]; then \
+			echo " PATCH  Downloading rabbitmq-server"; \
+			git clone https://github.com/rabbitmq/rabbitmq-server.git $(DEPS_DIR)/rabbit; \
+			ln -s $(DEPS_DIR)/rabbit $(DEPS_DIR)/rabbitmq-server; \
+		fi \
+	elif [ "$(RABBITMQ_SERVER_PATCH)" ]; then \
+		if [ ! -d $(DEPS_DIR)/rabbitmq-codegen ]; then \
+			echo " PATCH  Downloading rabbitmq-codegen"; \
+			git clone https://github.com/rabbitmq/rabbitmq-codegen.git $(DEPS_DIR)/rabbitmq-codegen; \
+		fi \
 	else \
 		$(call dep_autopatch,$(1)) \
 	fi

+ 5 - 0
test/Makefile

@@ -239,6 +239,11 @@ pkg-$(1): pkg-$(1)-clean pkg-$(1)-app1
 		source temp-python/bin/activate; \
 		$(MAKE) -C app1 RABBITMQ_CLIENT_PATCH=1; \
 		deactivate; \
+	elif [ "$(1)" = "rabbit" ]; then \
+		virtualenv -p /usr/bin/python2.7 --distribute temp-python; \
+		source temp-python/bin/activate; \
+		$(MAKE) -C app1 RABBITMQ_SERVER_PATCH=1; \
+		deactivate; \
 	else \
 		$(MAKE) -C app1; \
 	fi; \