@ -111,6 +111,30 @@ fb-setup:
$( QUIET) $( call silent_on_success,Facebook setup,\
$( QUIET) $( call silent_on_success,Facebook setup,\
$( MAKE) -C facebook setup)
$( MAKE) -C facebook setup)
OCAMLFORMAT_EXE = facebook/dependencies/ocamlformat/src/_build/opt/ocamlformat.exe
SRC_ML := $( shell find * \( -name _build -or -name facebook-clang-plugins -or -path facebook/dependencies \) -not -prune -or -type f -and -name '*' .ml -or -name '*' .mli 2>/dev/null)
.PHONY : fmt_all_ml
fmt_all_ml :
parallel $( OCAMLFORMAT_EXE) --no-warn-error -i -- $( SRC_ML)
SRC_RE := $( shell find infer/src -name '*' .re 2>/dev/null)
SRC_REI := $( shell find infer/src -name '*' .rei 2>/dev/null)
SRC_RE_ML := $( patsubst %.re,%.ml,$( SRC_RE) )
SRC_REI_MLI := $( patsubst %.rei,%.mli,$( SRC_REI) )
%.ml : %.re
refmt --print= binary_reason $< | $( OCAMLFORMAT_EXE) $< --reason-impl -o $@
%.mli : %.rei
refmt --print= binary_reason $< | $( OCAMLFORMAT_EXE) $< --reason-intf -o $@
.PHONY : fmt_all
fmt_all : fmt_all_ml $( SRC_RE_ML ) $( SRC_REI_MLI )
git add $( SRC_RE_ML) $( SRC_REI_MLI)
rm -f $( SRC_RE) $( SRC_REI)
.PHONY : src_build
.PHONY : src_build
src_build :
src_build :
$( QUIET) $( call silent_on_success,Building native Infer,\
$( QUIET) $( call silent_on_success,Building native Infer,\
@ -308,7 +332,7 @@ toplevel: clang_plugin
inferScriptMode_test : test_build
inferScriptMode_test : test_build
$( QUIET) $( call silent_on_success,Testing infer OCaml REPL,\
$( QUIET) $( call silent_on_success,Testing infer OCaml REPL,\
INFER_REPL_BINARY = ocaml TOPLEVEL_DIR = $( BUILD_DIR) /test/infer $( SCRIPT_DIR) /infer_repl \
INFER_REPL_BINARY = ocaml TOPLEVEL_DIR = $( BUILD_DIR) /test/infer $( SCRIPT_DIR) /infer_repl \
$( INFER_DIR) /tests/repl/infer_batch_script.ml)
$( INFER_DIR) /tests/repl/infer_batch_script.mltop )
.PHONY : checkCopyright
.PHONY : checkCopyright
checkCopyright :
checkCopyright :