From 0cda42fc90b327b21fdba32de613deee9cc926b2 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Sat, 7 May 2016 04:38:16 -0700 Subject: [PATCH] Add target to build single module Summary: Add a module target to the src Makefile that builds a single module and its dependencies, perhaps with extra flags. Useful for generating assembly or interfaces, as well as directing the typechecker when refactoring. Execute: `make INFER_CFLAGS= M=.cm{o,x} module` Reviewed By: jeremydubreil Differential Revision: D3273437 fb-gh-sync-id: 65a51d6 fbshipit-source-id: 65a51d6 --- infer/src/Makefile.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/infer/src/Makefile.in b/infer/src/Makefile.in index 63d622e80..03893a43b 100644 --- a/infer/src/Makefile.in +++ b/infer/src/Makefile.in @@ -184,6 +184,17 @@ byte: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MI $(INFERUNIT_MAIN).byte \ $(CHECKCOPYRIGHT_MAIN).byte +# to build only the single module (and its dependencies) with extra flags execute: +# make INFER_CFLAGS= M=.cm{o,x} module +M= +INFER_CFLAGS= + +module: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES) + $(OCAMLBUILD) -build-dir $(TEST_BUILD_DIR) $(JAVA_OCAMLBUILD_OPTIONS) \ + -cflags -warn-error,$(OCAML_FATAL_WARNINGS) \ + -cflags $(INFER_CFLAGS) \ + $(M) + test_build: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES) $(OCAMLBUILD) -build-dir $(TEST_BUILD_DIR) $(JAVA_OCAMLBUILD_OPTIONS) \ -cflags -warn-error,$(OCAML_FATAL_WARNINGS) \