From a328455cdc4cf9cbd51dbf9cefbe48fcd447ac48 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 17 Feb 2017 06:16:54 -0800 Subject: [PATCH] [clang models] make sure `make` compiles all source files when we retry infer to show errors Summary: Before: `make clean` followed by running `infer -- make`. If infer fails, it is rerun automatically (by the `silent_on_success` Makefile function) to show the output to the user, but by then there is nothing to build and `make` does nothing. Now: run directly `infer -- make clean all`. If infer fails, the command is rerun and rebuilds all the source files, so there is a higher chance that the same error will be displayed to the user than the one that originally caused the command to fail. Reviewed By: dulmarod Differential Revision: D4578477 fbshipit-source-id: 774f45c --- infer/models/c/Makefile | 3 +-- infer/models/cpp/Makefile | 3 +-- infer/models/objc/Makefile | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/infer/models/c/Makefile b/infer/models/c/Makefile index 7bbe0e99c..388dd9199 100644 --- a/infer/models/c/Makefile +++ b/infer/models/c/Makefile @@ -16,9 +16,8 @@ all: install $(INFER_RESULTS): $(C_MODELS_SOURCES) $(CLANG_DEPS) # make clean in src/ in case $(CLANG_DEPS) have changed - @$(MAKE) -C src clean $(call silent_on_success,\ - $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src) + $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(C_MODELS_FILE): $(INFER_RESULTS) @$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR) diff --git a/infer/models/cpp/Makefile b/infer/models/cpp/Makefile index 13f8be9b8..0f0af61e3 100644 --- a/infer/models/cpp/Makefile +++ b/infer/models/cpp/Makefile @@ -17,9 +17,8 @@ all: install $(INFER_RESULTS): $(CPP_MODELS_SOURCES) $(C_MODELS_SOURCES) $(CLANG_DEPS) # make clean in src/ in case $(CLANG_DEPS) have changed - @$(MAKE) -C src clean $(call silent_on_success,\ - $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src) + $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(CPP_MODELS_FILE): $(INFER_RESULTS) @$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR) diff --git a/infer/models/objc/Makefile b/infer/models/objc/Makefile index 05ea74daf..fb0b105e7 100644 --- a/infer/models/objc/Makefile +++ b/infer/models/objc/Makefile @@ -16,9 +16,8 @@ all: install $(INFER_RESULTS): $(OBJC_MODELS_SOURCES) $(CLANG_DEPS) # make clean in src/ in case $(CLANG_DEPS) have changed - @$(MAKE) -C src clean $(call silent_on_success,\ - $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src) + $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) $(OBJC_MODELS_FILE): $(INFER_RESULTS) @$(INSTALL_DATA) $(dir $(INFER_RESULTS))/specs/*.specs $(SPECS_LIB_DIR)