diff --git a/.gitignore b/.gitignore index 42089bca013..d8c4b74c11e 100644 --- a/.gitignore +++ b/.gitignore @@ -177,11 +177,6 @@ infer/src/.project /infer/src/_build /infer/src/dune.common /infer/src/dune -/infer/src/atd/dune -/infer/src/base/dune -/infer/src/IR/dune -/infer/src/istd/dune -/infer/src/scripts/dune /infer/src/dune-workspace .merlin diff --git a/Makefile b/Makefile index cfc5f770832..c55a86d7f4e 100644 --- a/Makefile +++ b/Makefile @@ -223,7 +223,7 @@ fb-setup: fmt: parallel $(OCAMLFORMAT_EXE) -i ::: $$(git diff --name-only --diff-filter=ACMRU $$(git merge-base origin/master HEAD) | grep "\.mli\?$$") -DUNE_ML:=$(shell find * -name 'dune*.in' | grep -v workspace) +DUNE_ML:=$(shell find * -name 'dune*.in' | grep -v workspace | grep -v infer-source) .PHONY: fmt_dune fmt_dune: diff --git a/infer/src/IR/dune b/infer/src/IR/dune new file mode 100644 index 00000000000..9f4d024251a --- /dev/null +++ b/infer/src/IR/dune @@ -0,0 +1,18 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(library + (name InferIR) + (public_name InferIR) + (flags + (:standard -open Core -open InferStdlib -open IStd -open InferGenerated + -open InferBase)) + (libraries core zarith InferStdlib InferGenerated InferBase) + (preprocess + (pps ppx_compare))) + +(documentation + (package InferIR) + (mld_files index)) diff --git a/infer/src/IR/dune.in b/infer/src/IR/dune.in deleted file mode 100644 index 12123142c93..00000000000 --- a/infer/src/IR/dune.in +++ /dev/null @@ -1,27 +0,0 @@ -(* -*- tuareg -*- *) -(* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -(* NOTE: prepend dune.common to this file! *) - -;; -Format.sprintf - {| -(library - (name InferIR) - (public_name InferIR) - (flags (:standard -open Core -open InferStdlib -open IStd -open InferGenerated -open InferBase)) - (libraries %s) - (preprocess (pps ppx_compare)) -) - -(documentation - (package InferIR) - (mld_files index) -) -|} - (String.concat " " ("InferBase" :: common_libraries)) -|> Jbuild_plugin.V1.send diff --git a/infer/src/Makefile b/infer/src/Makefile index 555d274972c..6dc01572b21 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -98,7 +98,7 @@ all: infer GENERATED_FROM_AUTOCONF = dune.common dune-workspace base/Version.ml -GENERATED_DUNES += dune atd/dune base/dune IR/dune istd/dune scripts/dune +GENERATED_DUNES += dune SRC_BUILD_COMMON = $(GENERATED_FROM_AUTOCONF) $(GENERATED_DUNES) $(OCAML_SOURCES) ifeq ($(BUILD_C_ANALYZERS),yes) @@ -307,12 +307,7 @@ $(GENERATED_DUNES): dune.common $(QUIET)cat $+ > $@ dune: dune.in -atd/dune: atd/dune.in -base/dune: base/dune.in deadcode/dune: deadcode/dune.in -IR/dune: IR/dune.in -istd/dune: istd/dune.in -scripts/dune: scripts/dune.in .PHONY: clean clean: diff --git a/infer/src/atd/dune b/infer/src/atd/dune new file mode 100644 index 00000000000..3de89b88e4a --- /dev/null +++ b/infer/src/atd/dune @@ -0,0 +1,17 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(library + (name InferGenerated) + (public_name InferGenerated) + (flags + (:standard -w -27-32-34-35-39)) + (libraries atdgen core) + (preprocess + (pps ppx_compare))) + +(documentation + (package InferGenerated) + (mld_files index)) diff --git a/infer/src/atd/dune.in b/infer/src/atd/dune.in deleted file mode 100644 index e33b7b496a2..00000000000 --- a/infer/src/atd/dune.in +++ /dev/null @@ -1,26 +0,0 @@ -(* -*- tuareg -*- *) -(* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -(* NOTE: prepend dune.common to this file! *) - -;; -Format.sprintf - {| -(library - (name InferGenerated) - (public_name InferGenerated) - (flags (:standard -w -27-32-34-35-39)) - (libraries atdgen core) - (preprocess (pps ppx_compare)) -) - -(documentation - (package InferGenerated) - (mld_files index) -) -|} -|> Jbuild_plugin.V1.send diff --git a/infer/src/base/dune b/infer/src/base/dune new file mode 100644 index 00000000000..447be7d0473 --- /dev/null +++ b/infer/src/base/dune @@ -0,0 +1,18 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(library + (name InferBase) + (public_name InferBase) + (flags + (:standard -open Core -open InferStdlib -open IStd -open InferGenerated)) + (libraries cmdliner core mtime.clock.os parmap re sqlite3 zip InferGenerated + InferStdlib) + (preprocess + (pps ppx_compare ppx_enumerate))) + +(documentation + (package InferBase) + (mld_files index)) diff --git a/infer/src/dune-project b/infer/src/dune-project index b5b88dc0f0e..1d537821adc 100644 --- a/infer/src/dune-project +++ b/infer/src/dune-project @@ -1,2 +1,7 @@ (lang dune 2.0) +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + (using menhir 1.0) diff --git a/infer/src/istd/dune b/infer/src/istd/dune new file mode 100644 index 00000000000..006e1a222c6 --- /dev/null +++ b/infer/src/istd/dune @@ -0,0 +1,17 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(library + (name InferStdlib) + (public_name InferStdlib) + (flags + (:standard -open Core)) + (libraries ANSITerminal core str yojson) + (preprocess + (pps ppx_compare))) + +(documentation + (package InferStdlib) + (mld_files index)) diff --git a/infer/src/istd/dune.in b/infer/src/istd/dune.in deleted file mode 100644 index b6b17483929..00000000000 --- a/infer/src/istd/dune.in +++ /dev/null @@ -1,27 +0,0 @@ -(* -*- tuareg -*- *) -(* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -(* NOTE: prepend dune.common to this file! *) - -;; -Format.sprintf - {| -(library - (name InferStdlib) - (public_name InferStdlib) - (flags (:standard -open Core)) - (libraries %s) - (preprocess (pps ppx_compare)) -) - -(documentation - (package InferStdlib) - (mld_files index) -) -|} - (String.concat " " common_libraries) -|> Jbuild_plugin.V1.send diff --git a/infer/src/scripts/dune b/infer/src/scripts/dune new file mode 100644 index 00000000000..10e5892e804 --- /dev/null +++ b/infer/src/scripts/dune @@ -0,0 +1,12 @@ +; Copyright (c) Facebook, Inc. and its affiliates. +; +; This source code is licensed under the MIT license found in the +; LICENSE file in the root directory of this source tree. + +(executable + (name checkCopyright) + (modes byte exe) + (flags (:standard)) + (libraries core str) + (preprocess + (pps ppx_compare))) diff --git a/infer/src/scripts/dune.in b/infer/src/scripts/dune.in deleted file mode 100644 index caef1ddc12c..00000000000 --- a/infer/src/scripts/dune.in +++ /dev/null @@ -1,20 +0,0 @@ -(* - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - *) -(* NOTE: prepend dune.common to this file! *) - -;; -Format.sprintf - {| -(executable - (name checkCopyright) - (modes byte exe) - (flags (:standard)) - (libraries core str) - (preprocess (pps ppx_compare)) -) -|} -|> Jbuild_plugin.V1.send