Commits

camlspotter committed c574674

doc

Comments (0)

Files changed (1)

 
 SpotInstall is a tool to facilitate the installation of OCaml annotation files (.cmt, .cmti, .spot, .spit). 
 
+Quick how-to-use for whom do not read manuals and complain later
+===================================================================
+
+To install ``.cmt*`` files of OCaml compiler standard library and others::
+
+    $ cd <your-ocaml-source> # ex. ~/.opam/4.01.0/build/ocaml/
+    $ spotinstall ocaml
+
+To install all the ``.cmt*`` files of OPAM build directory::
+
+    $ cd ~/.opam/<switch>/build # ex. ~/.opam/4.01.0/build/ocaml/
+    $ spotinstall  # This may take a long time
+
+To install ``.cmt*`` files of your library source code::
+
+    $ cd <your-source-directory>
+    $ spotinstall
+
 Introduction
 ===============================
 
 
 I propose a workaround, consists of two things:
 
-* A very small compiler patch which activates ``-annot`` and ``-bin-annot`` if ``OCAML_ANNOT`` environment variable is defined. (You no longer need to add ``-bin-annot`` to the build scripts.)
 * A small tool to install annotation files to the library destination directory. (You no longer need to add annotation file installation to the build scripts.)
+* (This is no longer required for OCaml 4.01.0 and newer.) For OCaml compiler 4.00.x, a very small compiler patch which activates ``-annot`` and ``-bin-annot`` if ``OCAML_ANNOT`` environment variable is defined. (You no longer need to add ``-bin-annot`` to the build scripts.)
 
 You *still* need to recompile the compiler and the libraries, but no need of changing their build scripts. 
 
-Annot compiler patch
-===============================
-
-For the first workaround, you need a small patch available from::
-
-    hg clone -b annot https://bitbucket.org/camlspotter/mutated_ocaml
-
-or included in this directory, ``ocaml-annot-<version>.patch``.
-
-You can also try OPAM compiler switch ``4.00.1+annot``. 
-
 SpotInstall
 ==============================
 
 =============================================================================
 
 No way. SpotInstall cannot help binaries.
+
+Annot compiler patch for OCaml 4.00.1
+=========================================
+
+This is no longer required for OCaml 4.01.0 and newer.
+Use OCAMLPARAM environment variable to override general compiler switches, like::
+
+    # bash
+    export OCAMLPARAM="_,bin-annot=1"
+
+For OCaml 4.00.1, you may need a small patch available from::
+
+    hg clone -b annot https://bitbucket.org/camlspotter/mutated_ocaml
+
+or included in this directory, ``ocaml-annot-<version>.patch``.
+
+You can also try OPAM compiler switch ``4.00.1+annot``.