summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2010-09-23 11:43:29 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2010-09-23 11:43:29 +0100
commit7715a6f108455647e5ef581dbd0daae19a642f81 (patch)
tree27318c07a9ac621954084e44a61503db3684fef3 /Makefile
parent42cd6a4e553e44dd09d2d8004cf7ea3eac7da25c (diff)
downloadrabbitmq-server-git-7715a6f108455647e5ef581dbd0daae19a642f81.tar.gz
By using an order only depend, we ensure that the deps file must exist, but it being newer than the beams will not cause beams to be rebuilt. We also ensure that if the deps is being rebuilt, we delete the old one first so that if deps generation fails, the order-only depends cannot be satisfied.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 38ec8196de..7c18cc7f16 100644
--- a/Makefile
+++ b/Makefile
@@ -92,12 +92,13 @@ endif
all: $(TARGETS)
$(DEPS_FILE): $(SOURCES) $(INCLUDES)
+ rm -f $@
escript generate_deps $(INCLUDE_DIR) $(SOURCE_DIR) \$$\(EBIN_DIR\) $@
$(EBIN_DIR)/rabbit.app: $(EBIN_DIR)/rabbit_app.in $(BEAM_TARGETS) generate_app
escript generate_app $(EBIN_DIR) $@ < $<
-$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl $(DEPS_FILE)
+$(EBIN_DIR)/%.beam: $(SOURCE_DIR)/%.erl | $(DEPS_FILE)
erlc $(ERLC_OPTS) -pa $(EBIN_DIR) $<
$(INCLUDE_DIR)/rabbit_framing.hrl: codegen.py $(AMQP_CODEGEN_DIR)/amqp_codegen.py $(AMQP_SPEC_JSON_FILES_0_9_1) $(AMQP_SPEC_JSON_FILES_0_8)