From a6d24ed3d1d32bfadf7b055fd1c161d770ae07cf Mon Sep 17 00:00:00 2001 From: Alexandru Scvortov Date: Fri, 16 Sep 2011 14:57:54 +0100 Subject: be smart about when building plugins --- Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3fecc735..517df80f 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ DOCS_DIR=docs INCLUDES=$(wildcard $(INCLUDE_DIR)/*.hrl) $(INCLUDE_DIR)/rabbit_framing.hrl SOURCES=$(wildcard $(SOURCE_DIR)/*.erl) $(SOURCE_DIR)/rabbit_framing_amqp_0_9_1.erl $(SOURCE_DIR)/rabbit_framing_amqp_0_8.erl $(USAGES_ERL) BEAM_TARGETS=$(patsubst $(SOURCE_DIR)/%.erl, $(EBIN_DIR)/%.beam, $(SOURCES)) -TARGETS=$(EBIN_DIR)/rabbit.app $(INCLUDE_DIR)/rabbit_framing.hrl $(BEAM_TARGETS) +TARGETS=$(EBIN_DIR)/rabbit.app $(INCLUDE_DIR)/rabbit_framing.hrl $(BEAM_TARGETS) plugins WEB_URL=http://www.rabbitmq.com/ MANPAGES=$(patsubst %.xml, %.gz, $(wildcard $(DOCS_DIR)/*.[0-9].xml)) WEB_MANPAGES=$(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml) $(DOCS_DIR)/rabbitmq-service.xml) @@ -57,7 +57,7 @@ endif ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall -v +debug_info $(call boolean_macro,$(USE_SPECS),use_specs) $(call boolean_macro,$(USE_PROPER_QC),use_proper_qc) VERSION=0.0.0 -PLUGINS_SRC_DIR= +PLUGINS_SRC_DIR?=$(shell [ -d "plugins-src" ] && echo "plugins-src" || echo ) PLUGINS_DIST_DIR?=provided_plugins TARBALL_NAME=rabbitmq-server-$(VERSION) TARGET_SRC_DIR=dist/$(TARBALL_NAME) @@ -104,11 +104,16 @@ endif all: $(TARGETS) .PHONY: plugins +ifneq "$(PLUGINS_SRC_DIR)" "" plugins: - [ -d "plugins-src" ] || { echo 'No plugins source distribution found (try linking public-umbrella to plugins-src/)'; false; } - -ln -s .. plugins-src/rabbitmq-server + [ -d "$(PLUGINS_SRC_DIR)" ] || { echo "No plugins source distribution found (try linking public-umbrella to $(PLUGINS_SRC_DIR)"; false; } + -ln -s .. "$(PLUGINS_SRC_DIR)/rabbitmq-server" mkdir -p provided_plugins - $(MAKE) -C plugins-src plugins-dist PLUGINS_DIST_DIR=$(CURDIR)/provided_plugins VERSION=$(VERSION) + $(MAKE) -C "$(PLUGINS_SRC_DIR)" plugins-dist PLUGINS_DIST_DIR="$(CURDIR)/provided_plugins" VERSION=$(VERSION) +else +plugins: +# Not building plugins +endif $(DEPS_FILE): $(SOURCES) $(INCLUDES) rm -f $@ -- cgit v1.2.1