diff --git a/Makefile b/Makefile index d6e57c36e..c04993c16 100644 --- a/Makefile +++ b/Makefile @@ -851,7 +851,7 @@ doc: src_build_common # do not call the browser if we are publishing the docs ifeq ($(filter doc-publish,${MAKECMDGOALS}),) $(QUIET)$(call silent_on_success,Opening in browser,\ - browse $(SRC_DIR)/_build/default/_doc/_html/index.html) + browse $(INFER_DIR)/_build/default/_doc/_html/index.html) $(QUIET)echo "Tip: you can generate the doc for all the opam dependencies of infer like this:" $(QUIET)echo $(QUIET)echo " odig odoc # takes a while, run it only when the dependencies change" diff --git a/infer/src/IR/index.mld b/infer/IR.mld similarity index 100% rename from infer/src/IR/index.mld rename to infer/IR.mld diff --git a/infer/InferBase.opam b/infer/InferBase.opam deleted file mode 100644 index e69de29bb..000000000 diff --git a/infer/InferGenerated.opam b/infer/InferGenerated.opam deleted file mode 100644 index e69de29bb..000000000 diff --git a/infer/InferIR.opam b/infer/InferIR.opam deleted file mode 100644 index e69de29bb..000000000 diff --git a/infer/InferStdlib.opam b/infer/InferStdlib.opam deleted file mode 100644 index e69de29bb..000000000 diff --git a/infer/src/atd/index.mld b/infer/atd.mld similarity index 100% rename from infer/src/atd/index.mld rename to infer/atd.mld diff --git a/infer/src/base/index.mld b/infer/base.mld similarity index 100% rename from infer/src/base/index.mld rename to infer/base.mld diff --git a/infer/dune b/infer/dune index cf17ffcd7..5f8ce6b3e 100644 --- a/infer/dune +++ b/infer/dune @@ -2,4 +2,10 @@ ; ; This source code is licensed under the MIT license found in the ; LICENSE file in the root directory of this source tree. + (dirs src bin) + +(documentation + (package infer) + (mld_files :standard) +) diff --git a/infer/index.mld b/infer/index.mld new file mode 100644 index 000000000..b7927d7e1 --- /dev/null +++ b/infer/index.mld @@ -0,0 +1,7 @@ +{1 Infer Libraries} + +- {{:infer.html}infer}: most of the modules: capture, analysis, integrations, ... +- {{:IR.html}IR}: the intermediate language used by the analysis +- {{:base.html}base}: configuration and utilities +- {{:atd.html}atd}: auto-generated datatypes +- {{:istd.html}}: additions to the Core standard library diff --git a/infer/src/index.mld b/infer/infer.mld similarity index 98% rename from infer/src/index.mld rename to infer/infer.mld index 668ba9a1c..fed43d14d 100644 --- a/infer/src/index.mld +++ b/infer/infer.mld @@ -50,7 +50,7 @@ Tips & Tricks: {2 eradicate/ } Eradicate [@Nullable] Checker -Eradicate is a type checker for [@Nullable] annotations for Java. The goal is to eradicate null pointer exceptions. See the online docs at {:http://fbinfer.com/docs/eradicate.html}. +Eradicate is a type checker for [@Nullable] annotations for Java. The goal is to eradicate null pointer exceptions. See the online docs at {:http://fbinfer.com/docs/eradicate}. The main entry point is module {!module-InferModules.Eradicate}. diff --git a/infer/src/istd/index.mld b/infer/istd.mld similarity index 100% rename from infer/src/istd/index.mld rename to infer/istd.mld diff --git a/infer/src/IR/dune b/infer/src/IR/dune index 9f4d02425..eee350067 100644 --- a/infer/src/IR/dune +++ b/infer/src/IR/dune @@ -5,14 +5,10 @@ (library (name InferIR) - (public_name InferIR) + (public_name infer.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/Makefile b/infer/src/Makefile index 5ea5d0708..78601d613 100644 --- a/infer/src/Makefile +++ b/infer/src/Makefile @@ -95,7 +95,7 @@ test: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) .PHONY: doc doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) - $(QUIET)$(DUNE_BUILD) @doc + $(QUIET)cd .. && $(DUNE_BUILD) @doc .PHONY: check check: src_build_common diff --git a/infer/src/atd/dune b/infer/src/atd/dune index 06484f4e9..85b4344f4 100644 --- a/infer/src/atd/dune +++ b/infer/src/atd/dune @@ -5,17 +5,13 @@ (library (name InferGenerated) - (public_name InferGenerated) + (public_name infer.InferGenerated) (flags (:standard -w -27-32-34-35-39)) (libraries atdgen core) (preprocess (pps ppx_compare))) -(documentation - (package InferGenerated) - (mld_files index)) - ; Rules below are boilerplatey, but this is benign and very easy to ; understand boilerplate. diff --git a/infer/src/base/dune b/infer/src/base/dune index 447be7d04..1300750b0 100644 --- a/infer/src/base/dune +++ b/infer/src/base/dune @@ -5,14 +5,10 @@ (library (name InferBase) - (public_name InferBase) + (public_name infer.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/base/dune.in b/infer/src/base/dune.in deleted file mode 100644 index d92c3f8cd..000000000 --- a/infer/src/base/dune.in +++ /dev/null @@ -1,24 +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 InferBase) - (public_name InferBase) - (flags (:standard -open Core -open InferStdlib -open IStd -open InferGenerated)) - (libraries InferStdlib InferGenerated core) - (preprocess (pps ppx_compare ppx_enumerate))) - -(documentation - (package InferBase) - (mld_files index)) -|} -|> Jbuild_plugin.V1.send diff --git a/infer/src/c_stubs/dune b/infer/src/c_stubs/dune index 7200fde3c..7e14f1af7 100644 --- a/infer/src/c_stubs/dune +++ b/infer/src/c_stubs/dune @@ -5,7 +5,7 @@ (library (name InferCStubs) - (public_name InferCStubs) + (public_name infer.InferCStubs) (foreign_stubs (language c) (names fnv64_hash))) diff --git a/infer/src/c_stubs/dune-project b/infer/src/c_stubs/dune-project deleted file mode 100644 index 180003629..000000000 --- a/infer/src/c_stubs/dune-project +++ /dev/null @@ -1,2 +0,0 @@ -(lang dune 2.0) -(name CStubs) diff --git a/infer/src/dune.in b/infer/src/dune.in index d4e18946a..0ae9f503b 100644 --- a/infer/src/dune.in +++ b/infer/src/dune.in @@ -91,13 +91,6 @@ let main_lib_stanza = (String.concat " " infer_binaries) -let docs_stanza = {| -(documentation - (package infer) - (mld_files index) -) -|} - let infer_exe_stanza = Format.sprintf {| @@ -150,8 +143,7 @@ let flatten_sources_stanzas = (** The build stanzas to be passed to dune *) let stanzas = - env_stanza :: main_lib_stanza :: infer_exe_stanza :: infertop_stanza :: docs_stanza - :: clang_lexer_stanzas + (env_stanza :: main_lib_stanza :: infer_exe_stanza :: infertop_stanza :: clang_lexer_stanzas) @ topl_stanzas @ flatten_sources_stanzas diff --git a/infer/src/istd/dune b/infer/src/istd/dune index 006e1a222..54403f67d 100644 --- a/infer/src/istd/dune +++ b/infer/src/istd/dune @@ -5,13 +5,9 @@ (library (name InferStdlib) - (public_name InferStdlib) + (public_name infer.InferStdlib) (flags (:standard -open Core)) (libraries ANSITerminal core str yojson) (preprocess (pps ppx_compare))) - -(documentation - (package InferStdlib) - (mld_files index))