[dune] jbuilder -> dune

Summary: the_future_is_now

Reviewed By: jberdine

Differential Revision: D8933124

fbshipit-source-id: e5df1a9a3
master
Jules Villard 6 years ago committed by Facebook Github Bot
parent 0bf9666639
commit 83a4a8fa5b

20
.gitignore vendored

@ -152,20 +152,20 @@ infer/src/.project
# generated by Maven # generated by Maven
/infer/annotations/target /infer/annotations/target
# jbuilder # dune
/infer/src/_build /infer/src/_build
/infer/src/jbuild.common /infer/src/dune.common
/infer/src/jbuild /infer/src/dune
/infer/src/atd/jbuild /infer/src/atd/dune
/infer/src/base/jbuild /infer/src/base/dune
/infer/src/IR/jbuild /infer/src/IR/dune
/infer/src/istd/jbuild /infer/src/istd/dune
/infer/src/scripts/jbuild /infer/src/scripts/dune
/infer/src/jbuild-workspace /infer/src/dune-workspace
.merlin .merlin
# generated when looking for dead code # generated when looking for dead code
/infer/src/deadcode/.depend /infer/src/deadcode/.depend
/infer/src/deadcode/jbuild /infer/src/deadcode/dune
/infer/src/deadcode/*.ml /infer/src/deadcode/*.ml
/infer/src/deadcode/*.mli /infer/src/deadcode/*.mli

@ -147,17 +147,17 @@ OCAMLFORMAT_EXE?=ocamlformat
fmt: fmt:
parallel $(OCAMLFORMAT_EXE) -i ::: $$(git diff --name-only $$(git merge-base origin/master HEAD) | grep "\.mli\?$$") parallel $(OCAMLFORMAT_EXE) -i ::: $$(git diff --name-only $$(git merge-base origin/master HEAD) | grep "\.mli\?$$")
JBUILD_ML:=$(shell find * -name 'jbuild*.in' | grep -v workspace | grep -v sledge) DUNE_ML:=$(shell find * -name 'dune*.in' | grep -v workspace | grep -v sledge)
.PHONY: fmt_jbuild .PHONY: fmt_dune
fmt_jbuild: fmt_dune:
parallel $(OCAMLFORMAT_EXE) -i ::: $(JBUILD_ML) parallel $(OCAMLFORMAT_EXE) -i ::: $(DUNE_ML)
SRC_ML:=$(shell find * \( -name _build -or -name facebook-clang-plugins -or -path facebook/dependencies -or -path sledge/llvm \) -not -prune -or -type f -and -name '*'.ml -or -name '*'.mli 2>/dev/null) SRC_ML:=$(shell find * \( -name _build -or -name facebook-clang-plugins -or -path facebook/dependencies -or -path sledge/llvm \) -not -prune -or -type f -and -name '*'.ml -or -name '*'.mli 2>/dev/null)
.PHONY: fmt_all .PHONY: fmt_all
fmt_all: fmt_all:
parallel $(OCAMLFORMAT_EXE) -i ::: $(SRC_ML) $(JBUILD_ML) parallel $(OCAMLFORMAT_EXE) -i ::: $(SRC_ML) $(DUNE_ML)
# pre-building these avoids race conditions when building, eg src_build and test_build in parallel # pre-building these avoids race conditions when building, eg src_build and test_build in parallel
.PHONY: src_build_common .PHONY: src_build_common

@ -0,0 +1,22 @@
(* -*- tuareg -*- *)
(* NOTE: prepend dune.common to this file! *)
;; Format.sprintf
{|
(library
(name InferIR)
(public_name InferIR)
(flags (%s -open Core -open InferStdlib -open IStd -open InferGenerated -open InferBase))
(ocamlopt_flags (%s))
(libraries %s)
(preprocess (pps ppx_compare))
)
(documentation
(package InferIR)
(mld_files index)
)
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " ("InferBase" :: common_libraries))
|> Jbuild_plugin.V1.send

@ -1,22 +0,0 @@
(* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *)
;; Format.sprintf
{|
(library
((name InferIR)
(public_name InferIR)
(flags (%s -open Core -open InferStdlib -open IStd -open InferGenerated -open InferBase))
(ocamlopt_flags (%s))
(libraries (%s))
(preprocess (pps (ppx_compare)))
))
(documentation
((package InferIR)
(mld_files (index))
))
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " ("InferBase" :: common_libraries))
|> Jbuild_plugin.V1.send

@ -9,7 +9,7 @@ include $(ROOT_DIR)/Makefile.config
#### Global declarations #### #### Global declarations ####
ETC_DIR = $(INFER_DIR)/etc ETC_DIR = $(INFER_DIR)/etc
# paths to BUILD_DIR are relative because that's how jbuilder likes it # paths to BUILD_DIR are relative because that's how dune likes it
# can be overriden to specify another build mode (eg opt) # can be overriden to specify another build mode (eg opt)
INFER_BUILD_DIR = _build/default INFER_BUILD_DIR = _build/default
@ -91,11 +91,11 @@ OCAML_SOURCES = \
.PHONY: all .PHONY: all
all: infer all: infer
GENERATED_FROM_AUTOCONF = jbuild.common jbuild-workspace base/Version.ml GENERATED_FROM_AUTOCONF = dune.common dune-workspace base/Version.ml
GENERATED_JBUILDS += jbuild atd/jbuild base/jbuild IR/jbuild istd/jbuild scripts/jbuild GENERATED_DUNES += dune atd/dune base/dune IR/dune istd/dune scripts/dune
SRC_BUILD_COMMON = $(GENERATED_FROM_AUTOCONF) $(GENERATED_JBUILDS) $(OCAML_SOURCES) SRC_BUILD_COMMON = $(GENERATED_FROM_AUTOCONF) $(GENERATED_DUNES) $(OCAML_SOURCES)
ifeq ($(BUILD_C_ANALYZERS),yes) ifeq ($(BUILD_C_ANALYZERS),yes)
SRC_BUILD_COMMON += $(CLANG_BINIOU_DICT) SRC_BUILD_COMMON += $(CLANG_BINIOU_DICT)
endif endif
@ -106,19 +106,19 @@ src_build_common: $(SRC_BUILD_COMMON)
# single out infer.exe as the source of truth for make, knowing that in fact several targets are # single out infer.exe as the source of truth for make, knowing that in fact several targets are
# produced by the build # produced by the build
$(INFER_BUILD_DIR)/$(INFER_MAIN).exe: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) $(INFER_BUILD_DIR)/$(INFER_MAIN).exe: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
$(QUIET)jbuilder build $(INFER_CONFIG_TARGETS) $(QUIET)dune build $(INFER_CONFIG_TARGETS)
# let make know that the target is up-to-date even if ocamlbuild cached it # let make know that the target is up-to-date even if ocamlbuild cached it
$(QUIET)touch $@ $(QUIET)touch $@
.PHONY: test .PHONY: test
test: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) test: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
$(QUIET)jbuilder build \ $(QUIET)dune build \
$(patsubst $(INFER_BUILD_DIR)/%.exe,_build/test/%.bc,$(INFER_CONFIG_TARGETS)) \ $(patsubst $(INFER_BUILD_DIR)/%.exe,_build/test/%.bc,$(INFER_CONFIG_TARGETS)) \
_build/test/scripts/checkCopyright.bc _build/test/$(INFERUNIT_MAIN).bc _build/test/infertop.bc _build/test/scripts/checkCopyright.bc _build/test/$(INFERUNIT_MAIN).bc _build/test/infertop.bc
.PHONY: doc .PHONY: doc
doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
$(QUIET)jbuilder build @$(INFER_BUILD_DIR)/doc $(QUIET)dune build @$(INFER_BUILD_DIR)/doc
INFER_BIN_ALIASES = $(foreach alias,$(INFER_COMMANDS),$(BIN_DIR)/$(alias)) INFER_BIN_ALIASES = $(foreach alias,$(INFER_COMMANDS),$(BIN_DIR)/$(alias))
@ -141,7 +141,7 @@ endif
infer: $(INFER_BIN).exe infer: $(INFER_BIN).exe
$(INFER_BUILD_DIR)/$(INFER_MAIN).bc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) $(INFER_BUILD_DIR)/$(INFER_MAIN).bc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
jbuilder build $(INFER_CONFIG_TARGETS:.exe=.bc) dune build $(INFER_CONFIG_TARGETS:.exe=.bc)
$(QUIET)touch $@ $(QUIET)touch $@
$(INFER_BIN).bc: $(INFER_BUILD_DIR)/$(INFER_MAIN).bc $(INFER_BIN_ALIASES) $(INFER_BIN).bc: $(INFER_BUILD_DIR)/$(INFER_MAIN).bc $(INFER_BIN_ALIASES)
@ -181,7 +181,7 @@ dsort:
$(QUIET)ocamldep.opt -sort $(inc_flags) $(ml_src_files) $(QUIET)ocamldep.opt -sort $(inc_flags) $(ml_src_files)
$(INFER_BUILD_DIR)/infertop.bc: $(SRC_DIR)/infertop.ml $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) $(INFER_BUILD_DIR)/infertop.bc: $(SRC_DIR)/infertop.ml $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
jbuilder build $@ dune build $@
$(QUIET)touch $@ $(QUIET)touch $@
.PHONY: toplevel .PHONY: toplevel
@ -191,7 +191,7 @@ toplevel: $(INFER_BUILD_DIR)/infertop.bc
checkCopyright: $(CHECKCOPYRIGHT_BIN) checkCopyright: $(CHECKCOPYRIGHT_BIN)
$(CHECKCOPYRIGHT_BIN): $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) $(CHECKCOPYRIGHT_BIN): $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
jbuilder build $(INFER_BUILD_DIR)/scripts/$(CHECKCOPYRIGHT_MAIN).exe dune build $(INFER_BUILD_DIR)/scripts/$(CHECKCOPYRIGHT_MAIN).exe
$(INSTALL_PROGRAM) $(INFER_BUILD_DIR)/scripts/$(CHECKCOPYRIGHT_MAIN).exe $(CHECKCOPYRIGHT_BIN) $(INSTALL_PROGRAM) $(INFER_BUILD_DIR)/scripts/$(CHECKCOPYRIGHT_MAIN).exe $(CHECKCOPYRIGHT_BIN)
define gen_atdgen_rules define gen_atdgen_rules
@ -258,20 +258,20 @@ $(GENERATED_FROM_AUTOCONF): $(MAKEFILE_LIST)
$@.in > "$$TMPFILE"; \ $@.in > "$$TMPFILE"; \
cat "$$TMPFILE" > $@; \ cat "$$TMPFILE" > $@; \
$(REMOVE) "$$TMPFILE" $(REMOVE) "$$TMPFILE"
jbuild.common: jbuild.common.in dune.common: dune.common.in
jbuild-workspace: jbuild-workspace.in dune-workspace: dune-workspace.in
base/Version.ml: base/Version.ml.in base/Version.ml: base/Version.ml.in
$(GENERATED_JBUILDS): jbuild.common $(GENERATED_DUNES): dune.common
$(QUIET)cat $+ > $@ $(QUIET)cat $+ > $@
jbuild: jbuild.in dune: dune.in
atd/jbuild: atd/jbuild.in atd/dune: atd/dune.in
base/jbuild: base/jbuild.in base/dune: base/dune.in
deadcode/jbuild: deadcode/jbuild.in deadcode/dune: deadcode/dune.in
IR/jbuild: IR/jbuild.in IR/dune: IR/dune.in
istd/jbuild: istd/jbuild.in istd/dune: istd/dune.in
scripts/jbuild: scripts/jbuild.in scripts/dune: scripts/dune.in
.PHONY: clean .PHONY: clean
clean: clean:
@ -281,8 +281,8 @@ clean:
$(REMOVE_DIR) $(BUILD_DIR) $(REMOVE_DIR) $(BUILD_DIR)
$(REMOVE) $(ETC_DIR)/clang_ast.dict $(REMOVE) $(ETC_DIR)/clang_ast.dict
$(REMOVE) $(GENERATED_FROM_AUTOCONF) $(REMOVE) $(GENERATED_FROM_AUTOCONF)
$(REMOVE) $(GENERATED_JBUILDS) $(REMOVE) $(GENERATED_DUNES)
$(REMOVE) base/Version.ml.tmp.* jbuild.tmp.* jbuild-workspace.tmp.* $(REMOVE) base/Version.ml.tmp.* dune.tmp.* dune-workspace.tmp.*
# be a bit more aggressive than needed with what we remove here so that stale binaries that # be a bit more aggressive than needed with what we remove here so that stale binaries that
# only existed in previous versions get removed as well # only existed in previous versions get removed as well
$(REMOVE) $(BIN_DIR)/Infer* $(BIN_DIR)/infer-* $(INFER_BIN){,.bc,.exe} $(INFER_BIN_ALIASES) \ $(REMOVE) $(BIN_DIR)/Infer* $(BIN_DIR)/infer-* $(INFER_BIN){,.bc,.exe} $(INFER_BIN_ALIASES) \

@ -1,2 +1,2 @@
The OCaml source files for infer live here. The Makefile is The OCaml source files for infer live here. The Makefile is
responsible for building them, together with jbuild.in. responsible for building them, together with dune.in.

@ -0,0 +1,24 @@
(* -*- tuareg -*- *)
(* NOTE: prepend dune.common to this file! *)
let cflags = common_cflags @ ["-w"; "-27-32-34-35-39"]
;; Format.sprintf
{|
(library
(name InferGenerated)
(public_name InferGenerated)
(flags (%s))
(ocamlopt_flags (%s))
(libraries atdgen core)
(preprocess (pps ppx_compare))
)
(documentation
(package InferGenerated)
(mld_files index)
)
|}
(String.concat " " cflags)
(String.concat " " common_optflags)
|> Jbuild_plugin.V1.send

@ -1,24 +0,0 @@
(* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *)
let cflags = common_cflags @ ["-w"; "-27-32-34-35-39"]
;; Format.sprintf
{|
(library
((name InferGenerated)
(public_name InferGenerated)
(flags (%s))
(ocamlopt_flags (%s))
(libraries (atdgen core))
(preprocess (pps (ppx_compare)))
))
(documentation
((package InferGenerated)
(mld_files (index))
))
|}
(String.concat " " cflags)
(String.concat " " common_optflags)
|> Jbuild_plugin.V1.send

@ -0,0 +1,22 @@
(* -*- tuareg -*- *)
(* NOTE: prepend dune.common to this file! *)
;; Format.sprintf
{|
(library
(name InferBase)
(public_name InferBase)
(flags (%s -open Core -open InferStdlib -open IStd -open InferGenerated))
(ocamlopt_flags (%s))
(libraries %s)
(preprocess (pps ppx_compare))
)
(documentation
(package InferBase)
(mld_files index)
)
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " ("InferStdlib" :: "InferGenerated" :: common_libraries))
|> Jbuild_plugin.V1.send

@ -1,22 +0,0 @@
(* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *)
;; Format.sprintf
{|
(library
((name InferBase)
(public_name InferBase)
(flags (%s -open Core -open InferStdlib -open IStd -open InferGenerated))
(ocamlopt_flags (%s))
(libraries (%s))
(preprocess (pps (ppx_compare)))
))
(documentation
((package InferBase)
(mld_files (index))
))
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " ("InferStdlib" :: "InferGenerated" :: common_libraries))
|> Jbuild_plugin.V1.send

@ -18,7 +18,7 @@
# 4. Kill detected dead code; repeat until dry. # 4. Kill detected dead code; repeat until dry.
# #
# Infer is first compiled so that atdgen, ocamllex, and menhir generate the appropriate files. The # Infer is first compiled so that atdgen, ocamllex, and menhir generate the appropriate files. The
# ocamllex and menhir files are generated inside ../_build by jbuilder, and copied here by this # ocamllex and menhir files are generated inside ../_build by dune, and copied here by this
# Makefile. # Makefile.
# #
# ocamldepend is used to `cat` the source files in the right order into all_infer_in_one_file.ml. # ocamldepend is used to `cat` the source files in the right order into all_infer_in_one_file.ml.
@ -127,11 +127,11 @@ flatten_infer: infer.cmx unit/inferunit.cmx facebook/InferCreateTraceViewLinks.c
.PHONY: detect_dead_code .PHONY: detect_dead_code
detect_dead_code: detect_dead_code:
$(MAKE) clean $(MAKE) clean
# create a dummy implementation file to keep jbuilder happy, as we are about to generate the # create a dummy implementation file to keep dune happy, as we are about to generate the
# jbuilder file for this directory # dune file for this directory
touch $(ALL_INFER_IN_ONE_FILE_ML) $(ALL_INFER_IN_ONE_FILE_ML:.ml=.mli) touch $(ALL_INFER_IN_ONE_FILE_ML) $(ALL_INFER_IN_ONE_FILE_ML:.ml=.mli)
# needed to get jbuild generated, and the generated code for the lexers and parsers in ../_build # needed to get dune generated, and the generated code for the lexers and parsers in ../_build
$(MAKE) GENERATED_JBUILDS=deadcode/jbuild -C .. test $(MAKE) GENERATED_DUNES=deadcode/dune -C .. test
# copy generated source files from ../_build # copy generated source files from ../_build
for file in $(ml_src_files_from_mlly); do \ for file in $(ml_src_files_from_mlly); do \
set +e; \ set +e; \
@ -153,14 +153,14 @@ detect_dead_code:
$(MAKE) -j 1 ALL_INFER_IN_ONE_FILE_ML="$$tmp_file" flatten_infer; \ $(MAKE) -j 1 ALL_INFER_IN_ONE_FILE_ML="$$tmp_file" flatten_infer; \
mv "$$tmp_file" $(ALL_INFER_IN_ONE_FILE_ML) mv "$$tmp_file" $(ALL_INFER_IN_ONE_FILE_ML)
# build and get dead code warnings; clean in case of errors so as not to leave rubbish around # build and get dead code warnings; clean in case of errors so as not to leave rubbish around
if ! jbuilder build $(INFER_BUILD_DIR)/deadcode/all_infer_in_one_file.bc; then \ if ! dune build $(INFER_BUILD_DIR)/deadcode/all_infer_in_one_file.bc; then \
$(MAKE) clean; \ $(MAKE) clean; \
exit 1; \ exit 1; \
fi fi
# be paranoid about cleaning because we do not want to include infer_in_one_file into infer by # be paranoid about cleaning because we do not want to include infer_in_one_file into infer by
# accident and I don't know enough jbuilder to be positive that it won't happen # accident and I don't know enough dune to be positive that it won't happen
$(MAKE) clean $(MAKE) clean
.PHONY: clean .PHONY: clean
clean: clean:
$(REMOVE) .depend *.ml *.mli jbuild $(REMOVE) .depend *.ml *.mli dune

@ -0,0 +1,18 @@
(* -*- tuareg -*- *)
(* NOTE: prepend dune.common to this file! *)
;; Format.sprintf
{|
(executable
(name all_infer_in_one_file)
(flags (%s -w +60))
(ocamlopt_flags (%s))
(libraries %s)
(modules All_infer_in_one_file)
(preprocess (pps ppx_compare ppx_sexp_conv -no-check))
)
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " common_libraries)
|> Jbuild_plugin.V1.send

@ -1,18 +0,0 @@
(* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *)
;; Format.sprintf
{|
(executable
((name all_infer_in_one_file)
(flags (%s -w +60))
(ocamlopt_flags (%s))
(libraries (%s))
(modules (All_infer_in_one_file))
(preprocess (pps (ppx_compare ppx_sexp_conv -no-check)))
))
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " common_libraries)
|> Jbuild_plugin.V1.send

@ -0,0 +1,2 @@
(lang dune 1.0)
(using menhir 1.0)

@ -0,0 +1,5 @@
(lang dune 1.0)
(context (opam (switch @OPAMSWITCH@) (name default) (merlin)))
(context (opam (switch @OPAMSWITCH@) (name opt)))
(context (opam (switch @OPAMSWITCH@) (name test)))

@ -1,5 +1,5 @@
(* -*- tuareg -*- *) (* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *) (* NOTE: prepend dune.common to this file! *)
let ( ^/ ) = Filename.concat let ( ^/ ) = Filename.concat
@ -41,29 +41,28 @@ let infer_cflags =
; "InferBase" ] ; "InferBase" ]
(** The build stanzas to be passed to jbuilder *) (** The build stanzas to be passed to dune *)
let stanzas = let stanzas =
( if clang then ( if clang then ["(ocamllex types_lexer ctl_lexer)"; "(menhir (modules types_parser ctl_parser))"]
["(ocamllex (types_lexer ctl_lexer))"; "(menhir ((modules (types_parser ctl_parser))))"]
else [] ) else [] )
@ ( if python && facebook then ["(ocamllex (pythonLexer))"; "(menhir ((modules (pythonParser))))"] @ ( if python && facebook then ["(ocamllex pythonLexer)"; "(menhir (modules pythonParser))"]
else [] ) else [] )
@ [ Format.sprintf @ [ Format.sprintf
{| {|
(library (library
((name InferModules) (name InferModules)
(public_name infer) (public_name infer)
(flags (%s)) (flags (%s))
(ocamlopt_flags (%s)) (ocamlopt_flags (%s))
(libraries (%s)) (libraries %s)
(modules (:standard \ %s infertop)) (modules :standard \ %s infertop)
(preprocess (pps (ppx_compare ppx_sexp_conv -no-check))) (preprocess (pps ppx_compare ppx_sexp_conv -no-check))
)) )
(documentation (documentation
((package infer) (package infer)
(mld_files (index)) (mld_files index)
)) )
|} |}
(String.concat " " infer_cflags) (String.concat " " infer_cflags)
(String.concat " " common_optflags) (String.concat " " common_optflags)
@ -72,13 +71,13 @@ let stanzas =
; Format.sprintf ; Format.sprintf
{| {|
(executables (executables
((names (%s)) (names %s)
(flags (%s -open InferModules)) (flags (%s -open InferModules))
(ocamlopt_flags (%s)) (ocamlopt_flags (%s))
(libraries (InferModules)) (libraries InferModules)
(modules (%s)) (modules %s)
(preprocess (pps (ppx_compare ppx_sexp_conv -no-check))) (preprocess (pps ppx_compare ppx_sexp_conv -no-check))
)) )
|} |}
(String.concat " " infer_binaries) (String.concat " " infer_binaries)
(String.concat " " infer_cflags) (String.concat " " infer_cflags)
@ -87,12 +86,13 @@ let stanzas =
; Format.sprintf ; Format.sprintf
{| {|
(executable (executable
((name infertop) (name infertop)
(flags (%s)) (flags (%s))
(libraries (utop InferModules)) (libraries utop InferModules)
(modules (Infertop)) (modules Infertop)
(preprocess (pps (ppx_compare ppx_sexp_conv -no-check))) (preprocess (pps ppx_compare ppx_sexp_conv -no-check))
(link_flags (-linkall -warn-error -31)))) (link_flags (-linkall -warn-error -31))
)
|} |}
(String.concat " " infer_cflags) ] (String.concat " " infer_cflags) ]
@ ( List.map @ ( List.map

@ -0,0 +1,22 @@
(* -*- tuareg -*- *)
(* NOTE: prepend dune.common to this file! *)
;; Format.sprintf
{|
(library
(name InferStdlib)
(public_name InferStdlib)
(flags (%s -open Core))
(ocamlopt_flags (%s))
(libraries %s)
(preprocess (pps ppx_compare))
)
(documentation
(package InferStdlib)
(mld_files index)
)
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " common_libraries)
|> Jbuild_plugin.V1.send

@ -1,22 +0,0 @@
(* -*- tuareg -*- *)
(* NOTE: prepend jbuild.common to this file! *)
;; Format.sprintf
{|
(library
((name InferStdlib)
(public_name InferStdlib)
(flags (%s -open Core))
(ocamlopt_flags (%s))
(libraries (%s))
(preprocess (pps (ppx_compare)))
))
(documentation
((package InferStdlib)
(mld_files (index))
))
|}
(String.concat " " common_cflags)
(String.concat " " common_optflags)
(String.concat " " common_libraries)
|> Jbuild_plugin.V1.send

@ -1,3 +0,0 @@
(context ((switch @OPAMSWITCH@) (name default) (merlin)))
(context ((switch @OPAMSWITCH@) (name opt)))
(context ((switch @OPAMSWITCH@) (name test)))

@ -0,0 +1,12 @@
(* NOTE: prepend dune.common to this file! *)
;; Format.sprintf
{|
(executable
(name checkCopyright)
(flags (%s))
(libraries core str)
(preprocess (pps ppx_compare))
)
|}
(String.concat " " common_cflags)
|> Jbuild_plugin.V1.send

@ -1,12 +0,0 @@
(* NOTE: prepend jbuild.common to this file! *)
;; Format.sprintf
{|
(executable
((name checkCopyright)
(flags (%s))
(libraries (core str))
(preprocess (pps (ppx_compare)))
))
|}
(String.concat " " common_cflags)
|> Jbuild_plugin.V1.send

@ -35,9 +35,9 @@ depends: [
"conf-sqlite3" {build} "conf-sqlite3" {build}
"conf-zlib" {build} "conf-zlib" {build}
"ctypes" {>="0.9.2"} "ctypes" {>="0.9.2"}
"dune" {build & >="1.0"}
"extlib-compat" "extlib-compat"
"javalib" {>="2.3.4"} "javalib" {>="2.3.4"}
"jbuilder" {build & >="1.0+beta14"}
"mtime" "mtime"
"ocamlfind" {build} "ocamlfind" {build}
"ounit" {="2.0.5"} "ounit" {="2.0.5"}

@ -21,18 +21,19 @@ core_kernel = v0.11.0
cppo = 1.6.4 cppo = 1.6.4
cppo_ocamlbuild = 1.6.0 cppo_ocamlbuild = 1.6.0
ctypes = 0.14.0 ctypes = 0.14.0
dune = 1.0.0
easy-format = 1.3.1 easy-format = 1.3.1
extlib-compat = 1.7.2 extlib-compat = 1.7.2
fieldslib = v0.11.0 fieldslib = v0.11.0
integers = 0.2.2 integers = 0.2.2
jane-street-headers = v0.11.0 jane-street-headers = v0.11.0
javalib = 2.3.4 javalib = 2.3.4
jbuilder = 1.0+beta20 jbuilder = transition
menhir = 20171222 menhir = 20171222
mtime = 1.1.0 mtime = 1.1.0
num = 1.1 num = 1.1
ocaml-compiler-libs = v0.11.0 ocaml-compiler-libs = v0.11.0
ocaml-migrate-parsetree = 1.0.9 ocaml-migrate-parsetree = 1.0.11
ocamlbuild = 0.12.0 ocamlbuild = 0.12.0
ocamlfind = 1.8.0 ocamlfind = 1.8.0
octavius = 1.2.0 octavius = 1.2.0
@ -66,7 +67,7 @@ ppx_sexp_value = v0.11.0
ppx_tools = 5.1+4.06.0 ppx_tools = 5.1+4.06.0
ppx_typerep_conv = v0.11.0 ppx_typerep_conv = v0.11.0
ppx_variants_conv = v0.11.0 ppx_variants_conv = v0.11.0
ppxlib = 0.2.0 ppxlib = 0.2.1
re = 1.7.3 re = 1.7.3
result = 1.3 result = 1.3
sawja = 1.5.3 sawja = 1.5.3

@ -17,7 +17,7 @@ INCLUDE_FLAGS=$(find "$TOPLEVEL_DIR" -type d -name '*.objs' -exec printf -- '-I
# file. In interactive mode $SCRIPT_DIR isn't needed # file. In interactive mode $SCRIPT_DIR isn't needed
set -x set -x
# infertop expects to be run from where jbuild is located # infertop expects to be run from where dune is located
cd "$SCRIPT_DIR"/../infer cd "$SCRIPT_DIR"/../infer
"$TOPLEVEL_DIR"/infertop.bc \ "$TOPLEVEL_DIR"/infertop.bc \
-init "$SCRIPT_DIR"/toplevel_init \ -init "$SCRIPT_DIR"/toplevel_init \

@ -30,7 +30,7 @@ let flags deps =
{|(flags (%s %s)) {|(flags (%s %s))
(ocamlc_flags (%s)) (ocamlc_flags (%s))
(ocamlopt_flags (%s)) (ocamlopt_flags (%s))
(preprocess (pps (ppx_compare ppx_sexp_conv ppx_trace %s ppx_driver.runner)))|} (preprocess (pps ppx_compare ppx_sexp_conv ppx_trace %s ppx_driver.runner))|}
common_flags common_flags
(String.concat " " (String.concat " "
(List.map (fun d -> "-open " ^ String.capitalize_ascii d) ("core_kernel" :: deps))) (List.map (fun d -> "-open " ^ String.capitalize_ascii d) ("core_kernel" :: deps)))

Loading…
Cancel
Save