]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/library/librarian.ml
sieve of erathostene (proof of soundness almost done)
[helm.git] / helm / software / components / library / librarian.ml
index b765f64b65c37b4c4607ce66db06d5dd4c8e7524..aa6b2e81dd2e3997f96d41669e7ff245fc50e306 100644 (file)
@@ -153,6 +153,7 @@ module type Format =
     val mtime_of_source_object: source_object -> float option
     val mtime_of_target_object: target_object -> float option
     val is_readonly_buri_of: options -> source_object -> bool
+    val dotdothack: source_object -> source_object 
   end
 
 module Make = functor (F:Format) -> struct
@@ -355,7 +356,8 @@ module Make = functor (F:Format) -> struct
       if targets = [] then 
         make_aux root opts [] [] deps
       else
-        make_aux root opts [] [] (purge_unwanted_roots targets deps)
+        make_aux root opts [] [] 
+          (purge_unwanted_roots (List.map F.dotdothack targets) deps)
     in
     HLog.debug ("Leaving directory '"^root^"'");
     Sys.chdir old_root;
@@ -372,4 +374,11 @@ let write_deps_file root deps =
   close_out oc;
   HLog.message ("Generated: " ^ root ^ "/depends")
 ;;
+
+(* FG ***********************************************************************)
+
+(* scheme uri part as defined in URI Generic Syntax (RFC 3986) *)
+let uri_scheme_rex = Pcre.regexp "^[[:alpha:]][[:alnum:]\-+.]*:"
+
+let is_uri str =
+   Pcre.pmatch ~rex:uri_scheme_rex str