From 93b6980b281c489fd08ef859c0f325f4b6beac4a Mon Sep 17 00:00:00 2001 From: Mehdi Bouaziz Date: Tue, 11 Apr 2017 13:43:26 -0700 Subject: [PATCH] [Makefile] Models: add dependency on header files Reviewed By: jvillard Differential Revision: D4867378 fbshipit-source-id: 307f3a8 --- infer/models/c/Makefile | 2 +- infer/models/cpp/Makefile | 7 ++++--- infer/models/objc/Makefile | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/infer/models/c/Makefile b/infer/models/c/Makefile index 865f276e7..8656ef114 100644 --- a/infer/models/c/Makefile +++ b/infer/models/c/Makefile @@ -8,7 +8,7 @@ ROOT_DIR = ../../.. include $(ROOT_DIR)/Makefile.config -C_MODELS_SOURCES = $(shell find src/ -name "*.c") +C_MODELS_SOURCES = $(shell find src/ -name "*.[ch]") INFER_RESULTS = out/report.json all: install diff --git a/infer/models/cpp/Makefile b/infer/models/cpp/Makefile index 3c45adf2b..2d4157301 100644 --- a/infer/models/cpp/Makefile +++ b/infer/models/cpp/Makefile @@ -8,13 +8,14 @@ ROOT_DIR = ../../.. include $(ROOT_DIR)/Makefile.config -CPP_MODELS_SOURCES = $(shell find src/ -name "*.cpp") -C_MODELS_SOURCES = $(shell find src/c_src/ -name "*.c") +MODELS_SOURCES = $(shell find src/ -name "*.cpp") \ + $(shell find src/c_src/ -name "*.[ch]") \ + $(shell find include -type f) INFER_RESULTS = out/report.json all: install -$(INFER_RESULTS): $(CPP_MODELS_SOURCES) $(C_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) +$(INFER_RESULTS): $(MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) # make clean in src/ to recompile all the models $(QUIET)$(call silent_on_success,Building C++ models,\ $(INFER_BIN) -o $(@D) --models-mode --no-failures-allowed -- $(MAKE) -C src clean all) diff --git a/infer/models/objc/Makefile b/infer/models/objc/Makefile index 3f3e5fb52..cabdcc21b 100644 --- a/infer/models/objc/Makefile +++ b/infer/models/objc/Makefile @@ -8,7 +8,7 @@ ROOT_DIR = ../../.. include $(ROOT_DIR)/Makefile.config -OBJC_MODELS_SOURCES = $(shell find src/ -name "*.m" -or -name "*.c") +OBJC_MODELS_SOURCES = $(shell find src/ -name "*.[chm]") INFER_RESULTS = out/report.json all: install