[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
master
Jules Villard 7 years ago committed by Facebook Github Bot
parent 5b04b1ce89
commit 0ff4a1a3f0

@ -196,11 +196,11 @@ ifeq ($(BUILD_C_ANALYZERS),yes)
byte src_build src_build_common test_build: clang_plugin byte src_build src_build_common test_build: clang_plugin
endif endif
$(INFER_COMMAND_MANUALS): src_build Makefile $(INFER_COMMAND_MANUALS): $(INFER_BIN) $(MAKEFILE_LIST)
$(QUIET)$(MKDIR_P) $(@D) $(QUIET)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) $(patsubst infer-%.1,%,$(@F)) --help --help-format=groff > $@ $(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)$(MKDIR_P) $(@D)
$(QUIET)$(INFER_BIN) --help --help-format=groff > $@ $(QUIET)$(INFER_BIN) --help --help-format=groff > $@
@ -208,16 +208,22 @@ $(INFER_MANUALS_GZIPPED): %.gz: %
$(QUIET)$(REMOVE) $@ $(QUIET)$(REMOVE) $@
gzip $< gzip $<
infer_models: src_build infer_models: $(INFER_BIN)
ifeq ($(BUILD_JAVA_ANALYZERS),yes) ifeq ($(BUILD_JAVA_ANALYZERS),yes)
$(QUIET)$(call silent_on_success,Building Java annotations,\ $(MAKE) -C $(ANNOTATIONS_DIR)
$(MAKE) -C $(ANNOTATIONS_DIR))
endif endif
$(MAKE) -C $(MODELS_DIR) all
.PHONY: infer byte_infer
infer byte_infer:
$(QUIET)$(call silent_on_success,Building Infer models,\ $(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 .PHONY: opt
infer: src_build $(INFER_MANUALS) infer_models opt:
$(QUIET)$(MAKE) BUILD_MODE=opt infer
.PHONY: clang_setup .PHONY: clang_setup
clang_setup: clang_setup:

Loading…
Cancel
Save