Commits

camlspotter committed c99e508

removed annot from the targets

Comments (0)

Files changed (2)

+===========================================
+SpotInstall : a tool to install annot files
+============================================
+
+SpotInstall is a tool to facilitate the installation of OCaml annotation files (.cmt, .cmti, .spot, .spit). 
+
+Introduction
+===============================
+
+Many existing OCaml libraries, applications and the compiler itself do not produce or install the annotation files (.annot, .cmt, .cmti, .spot, .spit) which are essential for subexpression type queries (caml-types.el), definition seaches and code refactoring (TypeRex and OCamlSpotter). If you want to use development tools, you have to:
+
+* Rebuild all the software from the source, adding -annot/-bin-annot option to compiler flags in build scripts i.e. Makefile/OCamlBuild/OMakefile.
+* Install those annotation files together with the library objects and signatures. (Require modification of the build scripts)
+
+for all the programs.
+
+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 longder need to add -annot/-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.)
+
+For the first workaround, you need a small patch available from 
+>>
+  hg clone -b annot https://bitbucket.org/camlspotter/mutated_ocaml
+<<
+
+For the second one, you can use SpotInstall. This tool.
+
+Synopsis
+==============================
+
+>>
+  spotinstall <packages>
+<<
+
+The command checks the files in the installation directory of OCamlFind package <package>, and if there are corresponding annotation files in the current and its sub directories, copy them to the installation directory.
+
+If <package> is ocaml, spotinstall works bit differently and copies the annotation files build under OCaml compiler source tree.
+
+
+Notes
+===============================
+
+To use the annotation files installed by SpotInstall smoothly, you should keep your source trees and their annotation files.
       imp_ false (fun verbose -> 
         Arg.parse ["-v", Arg.Set verbose, "verbose"]  (fun x -> packages := x :: !packages)
           "spotinstall <packages>\n  \
-  Check the files installed as ocamlfind package <package>, and if there are corresponding .annot/.cmt/.cmti/.spot/.spit files in the current and sub directories, copy them to the installation directory."
+           Check the files installed as ocamlfind package <package>, and if there are corresponding .cmt/.cmti/.spot/.spit files in the current and sub directories, copy them to the installation directory."
       ))
   with
   | [], _ -> failwith "You must specify a package name"
   | Some p -> p
 
 let exts_of_sp = function
-  | ".cmx" | ".cmo" -> [ ".spot"; ".cmt"; ".annot" ]
+  | ".cmx" | ".cmo" -> [ ".spot"; ".cmt" ]
   | ".cmi" -> [ ".spit"; ".cmti"; ".cmt" ] (* Packed .cmi has no .spit but .spot *)
   | _ -> assert false
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.