From c959af34cb8dd6dff7aa56991a047479f2046f02 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 31 May 2016 08:33:45 -0700 Subject: [PATCH] Remove specs before rebuilding models Summary: Specs files can become stale and cause crashes if the serialized format changes. It is unclear how to add the right dependencies to the existing targets, so this patch just removes them. Perhaps when the specs are built we should drop an empty file to time-stamp them, and add a target that depends on e.g. InferAnalyze and produces that file, and then add dependencies on it. Reviewed By: jvillard Differential Revision: D3358460 fbshipit-source-id: d8aee48 --- infer/models/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/infer/models/Makefile b/infer/models/Makefile index c8d7a1be3..3a8aec38f 100644 --- a/infer/models/Makefile +++ b/infer/models/Makefile @@ -28,13 +28,19 @@ endif .PHONY: java clang clean $(CLANG_SUBDIRS) -clang: $(CLANG_SUBDIRS) +clean_specs: + $(REMOVE) $(SPECS_LIB_DIR)/*.specs -$(CLANG_SUBDIRS) $(JAVA_MODELS_DIR): +$(CLANG_SUBDIRS): $(MAKE) -C $@ install -clean: - @rm -f $(SPECS_LIB_DIR)/*.specs +clang: clean_specs + $(MAKE) $(CLANG_SUBDIRS) + +java: clean_specs + $(MAKE) -C $@ install + +clean: clean_specs $(MAKE) -C $(JAVA_MODELS_DIR) clean $(MAKE) -C $(C_MODELS_DIR) clean $(MAKE) -C $(CPP_MODELS_DIR) clean