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=<flags> M=<Module>.cm{o,x} module`

Reviewed By: jeremydubreil

Differential Revision: D3273437

fb-gh-sync-id: 65a51d6
fbshipit-source-id: 65a51d6
master
Josh Berdine 9 years ago committed by Facebook Github Bot 7
parent 6dfd1a317e
commit 0cda42fc90

@ -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 <Module> (and its dependencies) with extra flags execute:
# make INFER_CFLAGS=<flags> M=<Module>.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) \

Loading…
Cancel
Save