From 0ff4a1a3f0eddcd6e93eacfaa07c5483bc91e422 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Mon, 22 Jan 2018 05:52:22 -0800 Subject: [PATCH] [make] fewer phony dependencies Summary: This avoids rebuilding the man pages at every build. Also add a `byte_infer` target to build infer in bytecode + the models, and an `opt` target, as I found myself missing those. Reviewed By: mbouaziz Differential Revision: D6761008 fbshipit-source-id: ffedd4b --- Makefile | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5830b27e7..e0c365464 100644 --- a/Makefile +++ b/Makefile @@ -196,11 +196,11 @@ ifeq ($(BUILD_C_ANALYZERS),yes) byte src_build src_build_common test_build: clang_plugin endif -$(INFER_COMMAND_MANUALS): src_build Makefile +$(INFER_COMMAND_MANUALS): $(INFER_BIN) $(MAKEFILE_LIST) $(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help --help-format=groff > $@ -$(INFER_MANUAL): src_build Makefile +$(INFER_MANUAL): $(INFER_BIN) $(MAKEFILE_LIST) $(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(INFER_BIN) --help --help-format=groff > $@ @@ -208,16 +208,22 @@ $(INFER_MANUALS_GZIPPED): %.gz: % $(QUIET)$(REMOVE) $@ gzip $< -infer_models: src_build +infer_models: $(INFER_BIN) ifeq ($(BUILD_JAVA_ANALYZERS),yes) - $(QUIET)$(call silent_on_success,Building Java annotations,\ - $(MAKE) -C $(ANNOTATIONS_DIR)) + $(MAKE) -C $(ANNOTATIONS_DIR) endif + $(MAKE) -C $(MODELS_DIR) all + +.PHONY: infer byte_infer +infer byte_infer: $(QUIET)$(call silent_on_success,Building Infer models,\ - $(MAKE) -C $(MODELS_DIR) all) + $(MAKE) infer_models $(INFER_MANUALS)) +infer: src_build +byte_infer: byte -.PHONY: infer -infer: src_build $(INFER_MANUALS) infer_models +.PHONY: opt +opt: + $(QUIET)$(MAKE) BUILD_MODE=opt infer .PHONY: clang_setup clang_setup: