Commits

camlspotter committed dd38973

updated for ocaml 4

  • Participants
  • Parent commits fc6e69a

Comments (0)

Files changed (2)

 #   Subdirs()
 #
 # 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
+OCAML_PREINSTALLED_PACKS[]= bigarray camlp4 dbm dynlink graphics num num-top stdlib str threads unix findlib compiler-libs
 
 # byte/nat
 NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
 OMyManagedPackages(packages) =
    return $(set-diff $(packages), $(OCAML_PREINSTALLED_PACKS))
 
-#|Add dependencies of any build activity of this directory over $(files).
-#
-# .. note:: This functions introduces implicit rules: *you may need to export it, if you use this function in a local context.*
-RequireFiles(files) =
-    .SCANNER: scan-%: $(files)
-    % : $(files)
-    export
-
-#|Add dependencies of any build activity over $(packages).
+#|Add dependencies of OCaml compiled files (cmx, cmo, etc.) over $(files).
 #
 # .. note:: These functions introduce implicit rules: *you may need to export it, if you use this function in a local context.*
-RequirePackages(packages) =
-    RequireFiles($(OMyManagedPackages $(packages)))
-    export
-
-#|Add dependencies of any build activity of this directory over $(targets) and their dependencies
-# Creates an intermidiate md5 memo dependencies.md5
-#
-# .. note:: These functions introduce implicit rules: *you may need to export it, if you use this function in a local context.*
-RequireBuild(targets) =
-    dependencies.md5: $(targets)
-        CreateCheckSum($@, $(sequence-sort $(compare), $(dependencies-all $(targets))))
-    RequireFiles(dependencies.md5)
+OCamlRequire(files) =
+    %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit : $(files)
     export
 
 #|Add dependencies of OCaml compiled files (cmx, cmo, etc.) over $(packages).
     | [ "Py"; s ] when List.mem ("_" ^ s) classes -> true ,s
     | _ -> false, "NOPE!"
 
-  let rec extract_vals classes sig_item =
+  let extract_vals classes sig_item =
     let vals = ref [] in
     let rec visit rev_path sig_item =
       let register, mname = check_rev_path classes rev_path in
       | TyOfAmp (loc, ct1, ct2) -> TyOfAmp (loc, map false ct1, map false ct2)
       | TyPkg _ -> ctyp
       | TyAnt _ -> assert false
+      | _ -> assert false
     in
     map false ctyp
 
       | TyRec _ -> assert false
       | TyAnd _ -> assert false
       | TyAnt _ -> assert false
+      | _ -> assert false
     in
     nuv (f ctyp)
 
     build class_dep_graph modules
 
   let wrap = object
-    inherit Ast.map as super
+    inherit Ast.map as _super
 
     method !sig_item sig_item =
       let str_item = wrap_sig_item sig_item in