From c63970927d153b59c576e6319ed406412d64cc02 Mon Sep 17 00:00:00 2001 From: Matthew Sackman Date: Thu, 23 Sep 2010 11:43:29 +0100 Subject: 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. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1