From 5599f078ee5e866ba81a74e29d3ace46e9d915a6 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 28 Mar 2017 05:55:21 -0700 Subject: [PATCH] [make] do not overwrite execs in infer/bin/ when testing byte compilation Summary: We shouldn't install byte-executables unless the user types `make byte`. Othewise everything gets very slow and the cause is not obvious. Reviewed By: jeremydubreil Differential Revision: D4779135 fbshipit-source-id: 757bfa2 --- Makefile | 5 ++++- infer/src/Makefile | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c8aee6dc0..81880abfc 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,10 @@ test_build: clang_plugin ifeq ($(IS_FACEBOOK_TREE),yes) $(QUIET)$(MAKE) -C facebook setup endif - $(QUIET)$(MAKE) -C $(SRC_DIR) TEST=1 byte + $(QUIET)$(MAKE) -C $(SRC_DIR) TEST=1 byte_no_install +# byte_no_install builds most of what toplevel needs, so it's more efficient to run the +# toplevel build straight after it rather than in parallel. Note that both targets build files +# that the other doesn't. $(QUIET)$(MAKE) -C $(SRC_DIR) TEST=1 toplevel .PHONY: ocaml_unit_test diff --git a/infer/src/Makefile b/infer/src/Makefile index 7ff9c63f9..ea76ece7b 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -269,6 +269,9 @@ endif .PHONY: byte byte: $(INFER_BIN).byte +.PHONY: byte_no_install +byte_no_install: $(INFER_BUILD_DIR)/$(INFER_MAIN).byte + # to build only the single module (and its dependencies) with extra flags execute: # make MFLAGS= M=.cm{o,x} module # for example, to build the assembly for the Ident module, execute