Commits

camlspotter committed 2fcc85d

cleanup

Comments (0)

Files changed (1)

   else
       return $(array)
 
-#|Create md5 sum file of $(targets)
+#|Create md5 sum file of files $(targets)
 CreateCheckSum(pack, targets)=
     chan=$(fopen $(pack), w)
     fprintln($(chan), $(string $(targets)))
         println(dump md5 $(INSTALLED)/$(pack))
         CreateCheckSum($(INSTALLED)/$(pack), $(targets))
 
-# Misc tools
-# ======================================================================
-
-#|ditto.
-mkdir_if_not_exists(dir) =
-  if $(not $(test -e $(dir))):
-    mkdir $(dir) 
-  return
-
 # OCaml -where
 # ========================================================================
 
 # It includes "findlib" by default. If you want to build findlib in OMy framework, you have to remove it from the list.
 OCAML_PREINSTALLED_PACKS[]= bigarray camlp4 dbm dynlink graphics num num-top stdlib str threads unix findlib compiler-libs compiler-libs.common
 
-# byte/nat
+#|If set false in a project directory, native/byte compilation is disabled locally.
 NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
-#|If set false in a project directory, byte compilation is disabled there.
 BYTE_ENABLED = true
 
 ######################### Compiler
 
+#|Never use OCAMLFLAGS += ... to override this default. Redefine as OCAMLFLAGS = ...
 OCAMLFLAGS = -w A-4-9 -warn-error A-4-9
 
 OCAMLPACKAGEFLAGS=
     value $(OCAMLFIND) $(OCAMLOPT) $(OCAMLPACKAGEFLAGS) $(LAZY_OCAMLFINDFLAGS) $(PREFIXED_OCAMLPACKS) $(OCAMLFLAGS)\
               $(OCAMLOPTFLAGS) $(OCAMLPPFLAGS) $(PREFIXED_OCAMLINCLUDES)
 
-# Spot files (OCamlSpotter)
-# ==================================================================
-
-#| OCAML_SPOT is true if the compiler supports ocamlspot
-OCAML_SPOT = false
-match $(string $(shell ocamlc -version)) # We cannot use OCamlC since there may not be ocamlfind
-case $"ocamlspot"
-  OCAML_SPOT = true 
-  export
-
-#| Define OCAML_ANNOT so that custom ocamlc/ocamlopt automatically create spot/spit/annot files, even without -annot option.
+#| Define OCAML_ANNOT so that custom ocamlc/ocamlopt automatically create spot/spit/annot/cmt/cmti files, even without -annot/-bin-annot option. This requires a special compiler patch 
 setenv(OCAML_ANNOT, 1)
 
 # Additional implicit rules by file extensions
    protected.BYTE_TARGETS   = $(CMO)
    protected.NATIVE_TARGETS = $(CMX) $(OBJ)
 
-   if $(OCAML_SPOT)
-       if $(BYTE_ENABLED)
-          BYTE_TARGETS += $(file $(name).spot) $(file $(name).cmt)
-          export
-       else
-          NATIVE_TARGETS += $(file $(name).spot) $(file $(name).cmt)
-          export
-       export
+   if $(BYTE_ENABLED)
+      BYTE_TARGETS += $(file $(name).cmt)
+      export
+   else
+      NATIVE_TARGETS += $(file $(name).cmt)
+      export
+   export
 
    protected.TARGETS = $(CMI)
    if $(NATIVE_ENABLED)
   # CR jfuruse: x.cmi is required if x.mli does not exist!
   targets[]=META $(glob i, *.mli) $(library_name).cmi $(library_name).cmo $(library_name).cmx $(library_name).cma $(library_name).cmxa $(library_name).o $(library_name).a $(CSTUBLIBRARIES) $(MyOCamlPackageExtras)
 
-  if $(OCAML_SPOT)
-    targets[]+= $(library_name).spot $(library_name).cmt
+  targets[]+= $(library_name).cmt
 
   if $(defined INSTALLED)
     $(Installed $(library_name)): $(targets)
 #| Obtain files installed as PACK
 GET_OCAMLFIND_OBJS(pack)=
     return $(Files $(OCAMLFIND_DESTDIR)/$(pack))
+
+# Misc tools
+# ======================================================================
+
+#|ditto.
+mkdir_if_not_exists(dir) =
+  if $(not $(test -e $(dir))):
+    mkdir $(dir) 
+  return