camlspotter avatar camlspotter committed baca63e

version fix

Comments (0)

Files changed (12)

0scripts/0CONF.sh

+#!/bin/sh
+
+BIGVERSION=3.12
+VERSION=3.12.0+rc1
+OCAMLSPOTVERSION=3.12.0+rc1.0.0
+SVNREV=10630
+
+HG_PURE_OCAML="ocaml-3.12.0+rc1-10630"
+HG_RELEASE_REV="f90f6ea169fc"

0scripts/0MAKERELEASE

-#!/usr/bin/perl
+#!/bin/sh
 
-$VERSION="3.12.0.0.0";
-$PURE_OCAML="ocaml-3.12.0+rc1-10630";
-$RELEASE_REV="f90f6ea169fc";
+set -e 
 
-# `/bin/cp ocamlspot/INSTALL-ocamlspot.txt ocamlspot/BRAIN_DEAD_INSTALL.sh .`;
+. ./0CONF.sh
 
-`cd ocamlspot; make clean`;
-@files = ("ocamlspot");
+cd ..
 
-$tgz = sprintf "ocamlspotter-%s-tmp.tgz", $VERSION;
+(cd ocamlspot; make clean)
 
-$com = sprintf "tar zcvf $tgz --exclude=\"*~\" %s", join(' ', @files);
+tgz="ocamlspotter-tmp.tgz"
 
-print STDERR "$com\n";
-`$com`;
+tar zcf $tgz --exclude='*~' ocamlspot
 
-$dstdir = sprintf "ocamlspotter-%s", $VERSION;
+dstdir="ocamlspotter-$OCAMLSPOTVERSION"
+rm -rf $dstdir
 mkdir $dstdir;
 
-`hg diff -r $PURE_OCAML -r $RELEASE_REV -X "0*" -X ".hg[a-z]*" -X "ocamlspot" -X "boot" > $dstdir/compiler_patch.diff`;
+hg diff -r $HG_PURE_OCAML -r $HG_RELEASE_REV -X "0*" -X ".hg[a-z]*" -X "ocamlspot" -X "boot" > $dstdir/compiler_patch.diff
 
-$com = sprintf "(cd ocamlspotter-%s; tar zxvf ../$tgz)", $VERSION;
-`$com`;
+(cd $dstdir; tar zxf ../$tgz)
 
-`/bin/cp ocamlspot/INSTALL-ocamlspot.txt ocamlspot/BRAIN_DEAD_INSTALL.sh ocamlspot/VERIFY.sh $dstdir`;
+cp ocamlspot/INSTALL-ocamlspot.txt ocamlspot/BRAIN_DEAD_INSTALL.sh ocamlspot/VERIFY.sh $dstdir
 
-unlink "$tgz";
+rm $tgz
 
 
 

0scripts/0MAKESCRIPTS.sh

+#!/bin/sh
+
+set -e
+
+. ./0CONF.sh
+
+SED="sed -e s/%BIGVERSION%/$BIGVERSION/g -e s/%VERSION%/$VERSION/g -e s/%OCAMLSPOTVERSION%/$OCAMLSPOTVERSION/g -e s/%SVNREV%/$SVNREV/g"
+
+$SED INSTALL-ocamlspot.txt.in > ../ocamlspot/INSTALL-ocamlspot.txt
+$SED BRAIN_DEAD_INSTALL.sh.in > ../ocamlspot/BRAIN_DEAD_INSTALL.sh
+chmod +x ../ocamlspot/BRAIN_DEAD_INSTALL.sh
+$SED VERIFY.sh.in > ../ocamlspot/VERIFY.sh
+chmod +x ../ocamlspot/VERIFY.sh

0scripts/BRAIN_DEAD_INSTALL.sh.in

+#!/bin/sh
+# No warranty, no question. Just for brain-dead people.
+set -e
+svn checkout http://caml.inria.fr/svn/ocaml/release/%VERSION% .
+svn update -r %SVNREV%
+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

0scripts/INSTALL-ocamlspot.txt.in

+0. If you have no time to read the following, just try the script in the package:
+  
+    $ ./BRAIN_DEAD_INSTALL.sh
+
+  It will clone the official source of version %VERSION% 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 %VERSION%:
+
+  - grab it from http://caml.inria.fr/pub/distrib/ocaml-%BIGVERSION%/%VERSION%.tar.gz
+  - You can also use the SVN version
+    ( svn checkout http://caml.inria.fr/svn/ocaml/release/%VERSION% )
+
+2. Extract the compiler source.
+
+  - tar zxvf ocaml-%VERSION%.tar.gz
+  - cd ocaml-%VERSION%                 # do not forget this
+
+3. Extract ocamlspot.tgz and Apply the patch
+
+  - tar zxvf ocamlspotter-%OCAMLSPOTVERSION%.tgz
+  - mv ocamlspotter-%OCAMLSPOTVERSION%/* .
+  - patch -p1 < compiler_patch.diff
+
+  Check your patched source tree. It should have ocamlspot directory with the original files like INSTALL, LICENSE and VERSION.
+
+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
+
+9. Emacs interface
+
+  Write the following into your .emacs:
+
+  ; load-path
+  (setq load-path (cons "WHERE-YOU-HAVE-INSTALLED-THE-ELISP" load-path))
+ 
+  ; set the path of the ocamlspot binary
+  (setq ocamlspot-path "WHERE-YOU-HAVE-INSTALLED-THE-BINARIES/ocamlspot")
+ 
+  ; autoload
+  (autoload 'ocamlspot-query "ocamlspot" "OCamlSpot")
+ 
+  ; tuareg mode hook (use caml-mode-hook instead if you use caml-mode)
+    (add-hook 'tuareg-mode-hook 
+    	  '(lambda ()
+  	     (local-set-key "\C-c;" 'ocamlspot-query)
+  	     (local-set-key "\C-c\C-t" 'ocamlspot-type)
+             (local-set-key "\C-c\C-y" 'ocamlspot-type-and-copy)
+  	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
+  	     (local-set-key "\C-ct" 'caml-types-show-type)))
+ 
+10. How to use
+
+  Compiler your ML project by this patched compiler with -annot option to create .spot files. Open one of the source files in Emacs and place the cursor at the name whose definition is in question. Type C-c; will show you the defintion.
+
+11. bug report
+
+  Please report bugs to jun.furuse at gmail.

0scripts/VERIFY.sh.in

+#!/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/%VERSION% verify/
+cd verify
+svn update -r %SVNREV%
+./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
+ 
-3.12.0+dev27+camlspotter (2010-06-16)
+3.12.0+rc1+ocamlspotter
 
 # The version string is the first line of this file.
 # It must be in the format described in stdlib/sys.mli

ocamlspot/BRAIN_DEAD_INSTALL.sh

 # No warranty, no question. Just for brain-dead people.
 set -e
 svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.0+rc1 .
-svn update -r 10630 
+svn update -r 10630
 patch -p1 < compiler_patch.diff
 ./configure
 make core coreboot

ocamlspot/Changes

+3.12.0+rc1.0.0
+--------------
+
+Version number change
+
+- For OCaml 3.12.0+rc1
+- Now ocamlspotter has version numbers like 
+    <base compiler version>.<ocamlspot major>.<ocamlspot minor>
+- Code cleanups
+
 1.1
 -----
 

ocamlspot/INSTALL-ocamlspot.txt

   
     $ ./BRAIN_DEAD_INSTALL.sh
 
-  It will clone the official 3.11.2 source in the current directory, 
-  then apply the patch, and compile with the default configuration. 
-  Jump to 8 for the emacs lisp installation.
+  It will clone the official source of version 3.12.0+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.11.2.
+1. Ok, you are not brain dead. Download OCaml compiler version 3.12.0+rc1:
 
-  - grab it from http://caml.inria.fr/pub/distrib/ocaml-3.11/ocaml-3.11.2.tar.gz
+  - grab it from http://caml.inria.fr/pub/distrib/ocaml-3.12/3.12.0+rc1.tar.gz
   - You can also use the SVN version
-    ( svn checkout http://caml.inria.fr/svn/ocaml/release/3.11.2 )
+    ( svn checkout http://caml.inria.fr/svn/ocaml/release/3.12.0+rc1 )
 
 2. Extract the compiler source.
 
-  - tar zxvf ocaml-3.11.2.tar.gz
-  - cd ocaml-3.11.2                   # do not forget this
+  - tar zxvf ocaml-3.12.0+rc1.tar.gz
+  - cd ocaml-3.12.0+rc1                 # do not forget this
 
 3. Extract ocamlspot.tgz and Apply the patch
 
-  - tar zxvf ocamlspotter-1.1.tgz
-  - mv ocamlspotter-1.1/* .
+  - tar zxvf ocamlspotter-3.12.0+rc1.0.0.tgz
+  - mv ocamlspotter-3.12.0+rc1.0.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.
+  Check your patched source tree. It should have ocamlspot directory with the original files like INSTALL, LICENSE and VERSION.
 
 4. Build a bytecode compiler
 
   - ./configure
   - make core coreboot
-  - make world
 
 5. Manual ocamlbuild bootstrap:
 
-   Do not forget the following after make world:
- 
+   Do not forget the following after make coreboot:
+
+  - ./build/mixed-boot.sh
   - cp boot/myocamlbuild boot/myocamlbuild.boot
 
-6. Build native code compilers
+6. Continue building
 
+  - make world
   - make opt
   - make opt.opt
 
-7. Install it
+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
 
-8. Emacs interface
+9. Emacs interface
 
   Write the following into your .emacs:
 
   	     (local-set-key "\C-c\C-u" 'ocamlspot-use)
   	     (local-set-key "\C-ct" 'caml-types-show-type)))
  
-9. How to use
+10. How to use
 
-  Compiler your ML project by this patched compiler with -annot option 
-  to create .spot files. Open one of the source files in Emacs and place 
-  the cursor at the name whose definition is in question. Type C-c; will 
-  show you the defintion.
+  Compiler your ML project by this patched compiler with -annot option to create .spot files. Open one of the source files in Emacs and place the cursor at the name whose definition is in question. Type C-c; will show you the defintion.
 
-10. bug report
+11. bug report
 
   Please report bugs to jun.furuse at gmail.

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.0+rc1 verify/
 cd verify
-svn update -r 10630 
+svn update -r 10630
 ./configure
 make clean core coreboot world opt opt.opt
 rm -rf boot/Saved _build/boot/Saved
 *)
 
 let magic_number = "OCamlSpot"
-let version = "3.12.0.0"
+let version = "3.12.0+rc1.0"
 
 module Location_bound = struct
   open Location
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.