From ec7af097eb445aca3242372462a88fbfa8273542 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 14 Jun 2016 04:19:01 -0700 Subject: [PATCH] Generalize extra options for make module Summary: Allow passing any options to ocamlbuild, not just -cflags. Reviewed By: jvillard Differential Revision: D3417701 fbshipit-source-id: 4f7af22 --- infer/src/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/infer/src/Makefile b/infer/src/Makefile index a81f820f7..c1870a708 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -206,15 +206,16 @@ byte: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MI $(OCAMLBUILD_ALL) -build-dir $(INFER_BUILD_DIR) $(INFER_ALL_TARGETS:.native=.byte) # to build only the single module (and its dependencies) with extra flags execute: -# make INFER_CFLAGS= M=.cm{o,x} module +# make MFLAGS= M=.cm{o,x} module +# for example, to build the assembly for the Ident module, execute +# make MFLAGS="-ocamlopt 'ocamlopt -S'" M=Ident.cmx module M= -INFER_CFLAGS= +MFLAGS= module: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES) \ $(LLVM_SOURCES)/lLexer.ml $(LLVM_SOURCES)/lParser.ml $(OCAMLBUILD_ALL) -build-dir $(INFER_BUILD_DIR) \ - -cflags -warn-error,$(OCAML_FATAL_WARNINGS) \ - -cflags $(INFER_CFLAGS) \ + $(MFLAGS) \ $(M) test_build: init $(INFERPRINT_ATDGEN_STUBS) $(CLANG_ATDGEN_STUBS) $(INFER_CLANG_FCP_MIRRORED_FILES) \