Commits

camlspotter committed 1c0e8d9 Merge

merge

Comments (0)

Files changed (9)

    include OMyMakefile
    export
 
+.PHONY: all install clean
+
+OCAMLPACKAGEFLAGS=
+
+# BYTE_ENABLED= true
+
+OCAMLINCLUDES += 
+
+OCAMLFLAGS    += -annot -w Ae
+OCAMLCFLAGS   +=
+OCAMLOPTFLAGS += 
+OCAML_LINK_FLAGS += 
+OCAML_BYTE_LINK_FLAGS +=
+OCAML_NATIVE_LINK_FLAGS +=
+
 CAMLP4PACKS[]=
 
 OCAMLPACKS[]= 
    spotinstall
 
 MyOCamlProgram(spotinstall, $(FILES))
+
+.PHONY: install
+install: spotinstall.opt
+	install spotinstall.opt $(PREFIX)/bin/spotinstall
 try
   PREFIX=$(getenv PREFIX)
 default
-  try
-    PREFIX=$(getenv prefix)
-  default
-    eprintln(Specify PREFIX or prefix environment variable.)
-    exit 1 
+  eprintln(Specify PREFIX or prefix environment variable.)
+  exit 1 
 
 # OCaml 
 # ========================================================================
 OASISFormat: 0.2
 Name:        spotinstall
 Version:     1.0.0
-Synopsis:    A tool to facilitate the installation of OCaml annotation files.
+Synopsis:    A tool to facilitate the installation of OCaml annotation files (.cmt, .cmti, .spot, .spit). 
 Authors:     Jun FURUSE
 License:     LGPL-2.0 with OCaml linking exception
 Plugins:      StdFiles (0.2)
 BuildType:    Custom (0.2)
 InstallType:    Custom (0.2)
-XCustomBuild: yes no | omake --install; omake
-XCustomInstall: omake install
-XCustomUninstall: omake uninstall
+XCustomBuild: yes no | omake --install; PREFIX=$prefix omake
+XCustomInstall: PREFIX=$prefix omake install
+XCustomUninstall: PREFIX=$prefix omake uninstall
 BuildTools: omake
-BuildDepends:  unix

opam/spotinstall.1.0.0/descr

File contents unchanged.

opam/spotinstall.1.0.0/opam

 build: [
   ["ocaml" "setup.ml" "-configure" "--prefix" "%{prefix}%"]
   ["ocaml" "setup.ml" "-build"]
-  ["env" "PREFIX=%{prefix}%" "ocaml" "setup.ml" "-install"]
+  ["ocaml" "setup.ml" "-install"]
 ]
 remove: [
-  ["env" "PREFIX=%{prefix}%" "omake" "uninstall"]
+  ["omake" "unintall"]
 ]
 depends: [ "ocamlfind" "spotlib" {>="2.0.0"} "omake"]
 ocaml-version: [>= "4.00.0"]

opam/spotinstall.1.0.0/url

-archive: "https://bitbucket.org/camlspotter/spotinstall/get/1.0.0.tar.gz"
-checksum: "61ecf09c9f52dd7460b9fff7f2b080ca"
+archive: https://bitbucket.org/camlspotter/ocaml-indent/get/1.0.0.tar.gz

opam/template/descr

+A tool to facilitate the installation of OCaml annotation files (.cmt, .cmti, .spot, .spit). 
+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 sub-expression 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.
+
+SpotInstall provides a post-installation 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
+
+or included in this source package, ocaml-annot-<version>.patch.
+
+For the second one, you can use SpotInstall. This tool.

opam/template/opam

+depends: [ "ocamlfind" "spotlib" {>="2.0.0"} "omake"]
+ocaml-version: [>= "4.00.0"]
 (* setup.ml generated for the first time by OASIS v0.3.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 8842780c67601f77d14f3ca61cc0b035) *)
+(* DO NOT EDIT (digest: 81add4f47d96c0b859fd983824c0096e) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
             CustomPlugin.cmd_main =
               [
                  (OASISExpr.EBool true,
-                   ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                   ("yes",
+                     [
+                        "no";
+                        "|";
+                        "omake";
+                        "--install;";
+                        "PREFIX=$prefix";
+                        "omake"
+                     ]))
               ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("omake", ["install"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("PREFIX=$prefix", ["omake"; "install"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("PREFIX=$prefix", ["omake"; "uninstall"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
                CustomPlugin.cmd_main =
                  [
                     (OASISExpr.EBool true,
-                      ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                      ("yes",
+                        [
+                           "no";
+                           "|";
+                           "omake";
+                           "--install;";
+                           "PREFIX=$prefix";
+                           "omake"
+                        ]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "uninstall"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                }
                CustomPlugin.cmd_main =
                  [
                     (OASISExpr.EBool true,
-                      ("yes", ["no"; "|"; "omake"; "--install;"; "omake"]))
+                      ("yes",
+                        [
+                           "no";
+                           "|";
+                           "omake";
+                           "--install;";
+                           "PREFIX=$prefix";
+                           "omake"
+                        ]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("omake", ["uninstall"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("PREFIX=$prefix", ["omake"; "uninstall"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                }
           authors = ["Jun FURUSE"];
           homepage = None;
           synopsis =
-            "A tool to facilitate the installation of OCaml annotation files.";
+            "A tool to facilitate the installation of OCaml annotation files (.cmt, .cmti, .spot, .spit).";
           description = None;
           categories = [];
           conf_type = (`Configure, "internal", Some "0.3");
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\145a\006\006E\240\2552\203_\204\022-\234\025\232";
+     oasis_digest = Some "\197\133\157-\127\243fF\221\128\207\181\171B&\196";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 5536 "setup.ml"
+# 5578 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;