summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2015-09-03 15:23:07 +0200
committerJean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>2015-10-20 11:10:48 +0200
commitce62e5e78bc4ee8aa3f8412391bdbcc90793162c (patch)
tree521acf89b0c8ead5a24ee0819524e80862cb4a14 /Makefile
parent4331abe2d31bdd0b84f7953be138dcad2ad861ad (diff)
downloadrabbitmq-server-git-ce62e5e78bc4ee8aa3f8412391bdbcc90793162c.tar.gz
Update erlang.mk and rely on the new makedep feature
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 10 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4e82904568..d939eca156 100644
--- a/Makefile
+++ b/Makefile
@@ -17,10 +17,13 @@ WEB_MANPAGES = $(patsubst %.xml, %.man.xml, $(wildcard $(DOCS_DIR)/*.[0-9].xml)
USAGES_XML = $(DOCS_DIR)/rabbitmqctl.1.xml $(DOCS_DIR)/rabbitmq-plugins.1.xml
USAGES_ERL = $(foreach XML, $(USAGES_XML), $(call usage_xml_to_erl, $(XML)))
+.DEFAULT_GOAL = all
+
EXTRA_SOURCES += $(USAGES_ERL)
+$(PROJECT).d:: $(EXTRA_SOURCES)
+
DEP_PLUGINS = rabbit_common/mk/rabbitmq-run.mk
-ERLANG_MK_DISABLE_PLUGINS = edoc
include erlang.mk
@@ -28,10 +31,6 @@ include erlang.mk
# Compilation.
# --------------------------------------------------------------------
-COMPILE_FIRST = $(basename \
- $(notdir \
- $(shell grep -lw '^behaviour_info' src/*.erl)))
-
RMQ_ERLC_OPTS += -I $(DEPS_DIR)/rabbit_common/include
ifdef INSTRUMENT_FOR_QC
@@ -77,6 +76,11 @@ endif
ERLC_OPTS += $(RMQ_ERLC_OPTS)
+clean:: clean-extra-sources
+
+clean-extra-sources:
+ $(gen_verbose) rm -f $(EXTRA_SOURCES)
+
# --------------------------------------------------------------------
# Tests.
# --------------------------------------------------------------------
@@ -100,7 +104,7 @@ TEST_ERLC_OPTS += $(RMQ_ERLC_OPTS)
# Use tmp files rather than a pipeline so that we get meaningful errors
# Do not fold the cp into previous line, it's there to stop the file being
# generated but empty if we fail
-src/%_usage.erl:
+src/%_usage.erl::
$(gen_verbose) xsltproc --novalid --stringparam modulename "`basename $@ .erl`" \
$(DOCS_DIR)/usage.xsl $< > $@.tmp && \
sed -e 's/"/\\"/g' -e 's/%QUOTE%/"/g' $@.tmp > $@.tmp2 && \