camlspotter avatar camlspotter committed 41aa438

document update

Comments (0)

Files changed (5)

ocamlspot/BRAIN_DEAD_INSTALL.sh

-#!/bin/sh
-# No warranty, no question. Just for brain-dead people.
-set -e
-svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.1+rc1 .
-svn update -r 11094
-patch -p1 < compiler_patch.diff
-./configure
-make core coreboot
-./build/mixed-boot.sh
-cp boot/myocamlbuild boot/myocamlbuild.boot
-make world opt opt.opt
-echo ===================== testing =======================
-(cd ocamlspot/tests; make; ./auto-test.pl  *.ml *.mli) 
-echo ===================== congrats ======================
-echo Now you can type make intall
-echo Do not forget to install the elisp file, ocamlspot/ocamlspot.el
-echo and configure your .emacs

ocamlspot/INSTALL-ocamlspot.txt

-0. If you have no time to read the following, just try the script in the package:
-  
-    $ ./BRAIN_DEAD_INSTALL.sh
+0. OCamlSpotter requires patching against the OCaml compiler, but now, 
+   thanks to the very kind interpretation of the OCaml license, OCamlSpot can be distributed
+   as an entire modified source code tree of OCaml.
 
-  It will clone the official source of version 3.12.1+rc1 in the current directory, then apply the patch, and compile with the default configuration. Jump to 8 for the emacs lisp installation.
-
-1. Ok, you are not brain dead. Download OCaml compiler version 3.12.1+rc1:
-
-  - grab it from http://caml.inria.fr/pub/distrib/ocaml-3.12/3.12.1+rc1.tar.gz
-  - You can also use the SVN version
-    ( svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.1+rc1 )
-
-2. Extract the compiler source.
-
-  - tar zxvf ocaml-3.12.1+rc1.tar.gz
-  - cd ocaml-3.12.1+rc1                 # do not forget this
-
-3. Extract ocamlspot.tgz and Apply the patch
-
-  - tar zxvf ocamlspotter-3.12.1+rc1-1.3.0.tgz
-  - mv ocamlspotter-3.12.1+rc1-1.3.0/* .
-  - patch -p1 < compiler_patch.diff
-
-  Check your patched source tree. It should have ocamlspot directory with the original files like INSTALL, LICENSE and VERSION.
+   In the following, some step numbers are gone, they were required when OCamlSpotter is distributed
+   as a patch.
 
 4. Build a bytecode compiler
 
   - ./configure
   - make core coreboot
 
-5. Manual ocamlbuild bootstrap:
-
-   Do not forget the following after make coreboot:
-
-  - ./build/mixed-boot.sh
-  - cp boot/myocamlbuild boot/myocamlbuild.boot
-
 6. Continue building
 
   - make world
   - make opt
   - make opt.opt
 
-7. Check the patched compiler is compatible with the original
-
-  You can use VERIFY.sh to check that the patched compiler produces the same object files as the orignal compiler.
-
 8. Install it
 
   - make install

ocamlspot/README-ocamlspot.txt

+OCamlSpotter : OCaml source browsing
+====================================
+
+  Camel spotter: Oh, it was extremely interesting, very, very -
+    quite... it was dull; dull, dull, dull, oh God it was dull. 
+    Sitting in the Waterloo waiting room. ...
+
+                                     from You're No Fun Anymore, 
+                                    Monty Python's Flying Circus
+
+OCaml module language is powerful. So extremely powerful that you can
+be lost yourself easily inside a huge OCaml project with tons of
+modules and functors. Spotting the definition of a variable is
+sometimes "extremely interesting". Let's see such an example:
+
+  include M
+  open N
+  open O
+  let _ = f 1
+
+Suppose you are not familiar with the function f and want to spot its
+definition. Where to find it? Just from the code you are looking at,
+it is not sure: if you are enough lucky it may be f in m.ml, n.ml or
+o.ml in your current working directory. Otherwise, it may be O.f in
+n.ml. Or probably N.O.f in m.ml. If you are unlucky and the project is
+so sophisticated, there could be complex module operations in m.ml
+(i.e includes, functor applications) and therefore the definition
+might be found somewhere completely unexpected. Module packing, module
+load paths and library installation without .ml files complicate the
+situation even worse.
+
+You first days after joining a large OCaml project should be this kind
+of manual value definition spotting with find + grep commands. Yes,
+actually it is very educational: you can learn a lot about the project
+struggling in the source tree (only if your collegues have organized
+things very well :-P), but it is still a dull job...
+
+To say short, OCamlSpotter is a tool which does this dull job
+automatically for you and permits your energy for something more
+"interesting" like Yeti spotting:
+
+ - The -annot option of ocamlc and ocamlopt is extended and creates 
+   <module>.spot files (<module>.spit for .mli), which record the
+   location information of the names defined and used in the module.
+
+ - A small application ocamlspot provides automatic where-about
+   spotting of the definition of the name you are interested in.
+
+ - ocamlspot.el provides interactive ocaml-spotting of definition 
+   locations in emacs.
+
+ - Interfaces for other editors such as vi can be built easily, if you
+   want. I do not want.
+   
+Spotting / Definition analysis
+==============================
+
+SYNOPSIS
+
+      ocamlspot [search]
+            search ::= [file] | [file]:[pos] | [file]:[kind]:[path]
+            pos ::= l[line]c[column_bytes] | b[bytes] | [bytes]
+            kind ::= v|t|e|m|mt|c|ct
+
+DESCRIPTION
+
+      Retrieve various annotation information from .spot or .spit files
+      of the source code position or identifier, specified by the
+      search spec. Information is prited to stdout. They are:
+
+      Spot: file:pos
+          The definition position of the object which the search spec
+          points to, if available.
+
+      Type: type
+      XType: type     
+          The type of the object which the search spec points to, if
+          available. In XType, paths are printed with position
+          informaiton: for example, "unit__6" instead of "unit".
+
+SEARCH
+
+      Three kinds of searches are available: file-name-only, 
+      by-position and by-path:
+
+      File-name-only search show the position independent information
+      of the module specified by [file].
+
+        Example:
+
+	$ ocamlspot -i ocamlspot.ml
+	Compile: ../ocamlc -nostdlib -I ../stdlib -annot -annot -w Ae -warn-error Ae -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../otherlibs/unix -c ocamlspot.ml
+	Included_dirs:
+	  /..../ocaml/ocamlspot/
+	  /..../ocaml/ocamlspot/../stdlib
+	  /..../ocaml/ocamlspot/../parsing
+	  /..../ocaml/ocamlspot/../utils
+	  /..../ocaml/ocamlspot/../typing
+	  /..../ocaml/ocamlspot/../driver
+	  /..../ocaml/ocamlspot/../bytecomp
+	  /..../ocaml/ocamlspot/../tools
+	  /..../ocaml/ocamlspot/../toplevel/
+	  /..../ocaml/ocamlspot/../otherlibs/unix
+	BYE!
+
+      By-position search has the form [file]:[pos]. [file] is the path
+      of the target ml/mli file and [pos] is the position in the
+      target file. [pos] has three formats: l[line]c[column_bytes] by the
+      line number and column bytes, b[bytes] (and [bytes] for backward
+      compatibility) by the bytes from the beginning of the source
+      code. 
+
+        Example:
+
+	$ ocamlspot ocamlspot.ml:l129c14
+	Tree: l129c8b4035:l129c28b4055           # pos of the inner most node
+	In_module: With_pos.Fix
+	Use: Type, Path__360.t__G
+	Type: Path.t
+	XType: Path__360.t__G                    # type with ident id numbers
+	Spot: /..../ocaml/typing/path.ml:l15c5b875:l18c19b949 # the definition
+	BYE!
+
+      Note that bytes are not chars in multi-byte-character
+      environment. OCaml is completely free from such mess and you
+      might need to count chars by yourself.
+
+
+      By-path search shows the definition spot of the given path 
+      with ident id numbers. It will be useful with conjunction with 
+      the path names obtained from XType: fields. No fancy elisp wrapper
+      is not available for it, though.
+
+        Example:
+
+	# checking a type named Path__360.t__G
+	$ ocamlspot ocamlspot.ml:t:Path__360.t__G  
+	Spot: /..../ocaml/typing/path.ml:l15c5b875:l18c19b949
+	BYE!
+
+OPTIONS
+  
+      -n  
+          Skips the spotting, which may takes time. Useful if you are
+          interested in other things than the definition analysis,
+          i.e. types, paths, etc.
+    
+Bugs and future works
+=====================
+
+This software contain lots of bugs and todos.
+
+License
+=======
+
+Read LICENSE file in this directory. 
+
+Author
+======
+
+  Jun FURUSE (jun.furuse@gmail.com). Bug reports and comments are
+  welcome. Patches are appreciated. Donating camel related gadgets is
+  the most wonderful. Complaints might be simply ignored.

ocamlspot/README.txt

-OCamlSpotter : OCaml source browsing
-====================================
-
-  Camel spotter: Oh, it was extremely interesting, very, very -
-    quite... it was dull; dull, dull, dull, oh God it was dull. 
-    Sitting in the Waterloo waiting room. ...
-
-                                     from You're No Fun Anymore, 
-                                    Monty Python's Flying Circus
-
-OCaml module language is powerful. So extremely powerful that you can
-be lost yourself easily inside a huge OCaml project with tons of
-modules and functors. Spotting the definition of a variable is
-sometimes "extremely interesting". Let's see such an example:
-
-  include M
-  open N
-  open O
-  let _ = f 1
-
-Suppose you are not familiar with the function f and want to spot its
-definition. Where to find it? Just from the code you are looking at,
-it is not sure: if you are enough lucky it may be f in m.ml, n.ml or
-o.ml in your current working directory. Otherwise, it may be O.f in
-n.ml. Or probably N.O.f in m.ml. If you are unlucky and the project is
-so sophisticated, there could be complex module operations in m.ml
-(i.e includes, functor applications) and therefore the definition
-might be found somewhere completely unexpected. Module packing, module
-load paths and library installation without .ml files complicate the
-situation even worse.
-
-You first days after joining a large OCaml project should be this kind
-of manual value definition spotting with find + grep commands. Yes,
-actually it is very educational: you can learn a lot about the project
-struggling in the source tree (only if your collegues have organized
-things very well :-P), but it is still a dull job...
-
-To say short, OCamlSpotter is a tool which does this dull job
-automatically for you and permits your energy for something more
-"interesting" like Yeti spotting:
-
- - The -annot option of ocamlc and ocamlopt is extended and creates 
-   <module>.spot files (<module>.spit for .mli), which record the
-   location information of the names defined and used in the module.
-
- - A small application ocamlspot provides automatic where-about
-   spotting of the definition of the name you are interested in.
-
- - ocamlspot.el provides interactive ocaml-spotting of definition 
-   locations in emacs.
-
- - Interfaces for other editors such as vi can be built easily, if you
-   want. I do not want.
-   
-Spotting / Definition analysis
-==============================
-
-SYNOPSIS
-
-      ocamlspot [search]
-            search ::= [file] | [file]:[pos] | [file]:[kind]:[path]
-            pos ::= l[line]c[column_bytes] | b[bytes] | [bytes]
-            kind ::= v|t|e|m|mt|c|ct
-
-DESCRIPTION
-
-      Retrieve various annotation information from .spot or .spit files
-      of the source code position or identifier, specified by the
-      search spec. Information is prited to stdout. They are:
-
-      Spot: file:pos
-          The definition position of the object which the search spec
-          points to, if available.
-
-      Type: type
-      XType: type     
-          The type of the object which the search spec points to, if
-          available. In XType, paths are printed with position
-          informaiton: for example, "unit__6" instead of "unit".
-
-SEARCH
-
-      Three kinds of searches are available: file-name-only, 
-      by-position and by-path:
-
-      File-name-only search show the position independent information
-      of the module specified by [file].
-
-        Example:
-
-	$ ocamlspot -i ocamlspot.ml
-	Compile: ../ocamlc -nostdlib -I ../stdlib -annot -annot -w Ae -warn-error Ae -I ../parsing -I ../utils -I ../typing -I ../driver -I ../bytecomp -I ../tools -I ../toplevel/ -I ../otherlibs/unix -c ocamlspot.ml
-	Included_dirs:
-	  /..../ocaml/ocamlspot/
-	  /..../ocaml/ocamlspot/../stdlib
-	  /..../ocaml/ocamlspot/../parsing
-	  /..../ocaml/ocamlspot/../utils
-	  /..../ocaml/ocamlspot/../typing
-	  /..../ocaml/ocamlspot/../driver
-	  /..../ocaml/ocamlspot/../bytecomp
-	  /..../ocaml/ocamlspot/../tools
-	  /..../ocaml/ocamlspot/../toplevel/
-	  /..../ocaml/ocamlspot/../otherlibs/unix
-	BYE!
-
-      By-position search has the form [file]:[pos]. [file] is the path
-      of the target ml/mli file and [pos] is the position in the
-      target file. [pos] has three formats: l[line]c[column_bytes] by the
-      line number and column bytes, b[bytes] (and [bytes] for backward
-      compatibility) by the bytes from the beginning of the source
-      code. 
-
-        Example:
-
-	$ ocamlspot ocamlspot.ml:l129c14
-	Tree: l129c8b4035:l129c28b4055           # pos of the inner most node
-	In_module: With_pos.Fix
-	Use: Type, Path__360.t__G
-	Type: Path.t
-	XType: Path__360.t__G                    # type with ident id numbers
-	Spot: /..../ocaml/typing/path.ml:l15c5b875:l18c19b949 # the definition
-	BYE!
-
-      Note that bytes are not chars in multi-byte-character
-      environment. OCaml is completely free from such mess and you
-      might need to count chars by yourself.
-
-
-      By-path search shows the definition spot of the given path 
-      with ident id numbers. It will be useful with conjunction with 
-      the path names obtained from XType: fields. No fancy elisp wrapper
-      is not available for it, though.
-
-        Example:
-
-	# checking a type named Path__360.t__G
-	$ ocamlspot ocamlspot.ml:t:Path__360.t__G  
-	Spot: /..../ocaml/typing/path.ml:l15c5b875:l18c19b949
-	BYE!
-
-OPTIONS
-  
-      -n  
-          Skips the spotting, which may takes time. Useful if you are
-          interested in other things than the definition analysis,
-          i.e. types, paths, etc.
-    
-Bugs and future works
-=====================
-
-This software contain lots of bugs and todos.
-
-License
-=======
-
-Read LICENSE file in this directory. 
-
-Author
-======
-
-  Jun FURUSE (jun.furuse@gmail.com). Bug reports and comments are
-  welcome. Patches are appreciated. Donating camel related gadgets is
-  the most wonderful. Complaints might be simply ignored.

ocamlspot/VERIFY.sh

-#!/bin/sh
-
-# This script checks that the patch extends ocaml compiler conservatively:
-# Object files created by the original and patched compilers are the same.
-
-set -e
-rm -rf verify
-svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.1+rc1 verify/
-cd verify
-svn update -r 11094
-./configure
-make clean core coreboot world opt opt.opt
-rm -rf boot/Saved _build/boot/Saved
-find . -iregex '.*\.\(cm.*\|o\)' | sort | xargs md5sum > MD5-original
-rm -rf boot/*
-cp ../boot/[a-z]* boot
-make clean world opt opt.opt
-rm -rf boot/Saved _build/boot/Saved
-find . -iregex '.*\.\(cm.*\|o\)' | sort | xargs md5sum > MD5-ocamlspot
-if cmp MD5-original MD5-ocamlspot; then
-    echo "All the object files are equal!"
-else
-    echo "Something different is created by compiler+ocamlspot!"
-fi
- 
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.