summaryrefslogtreecommitdiff
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
commitc63970927d153b59c576e6319ed406412d64cc02 (patch)
tree27318c07a9ac621954084e44a61503db3684fef3
parent347ea71a8c20a8b76ccd753c4c4ab3fd30d5fb4d (diff)
downloadrabbitmq-server-bug23300.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.bug23300
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 38ec8196..7c18cc7f 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)