X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2FmatitamakeLib.ml;h=4544f9ada5c6f99ebeb23131609b1103d433f584;hb=72e7d9c9d410ded571b9d3c396197b26181c1e2a;hp=013d45b7a8a8fd4687386d0f73490cb8e31aa361;hpb=4455a7194290db6bbe79c8bb52882d00997aa494;p=helm.git diff --git a/matita/matitamakeLib.ml b/matita/matitamakeLib.ml index 013d45b7a..4544f9ada 100644 --- a/matita/matitamakeLib.ml +++ b/matita/matitamakeLib.ml @@ -75,7 +75,12 @@ let initialize () = match root with | None -> () | Some root -> - developments := {root = root ; name = name} :: !developments) + developments := {root = root ; name = name} :: !developments; + let inc = Helm_registry.get_list + Helm_registry.string "matita.includes" in + Helm_registry.set_list Helm_registry.of_string + ~key:"matita.includes" ~value:(inc @ [root]) + ) l (* finds the makefile path for development devel *) @@ -96,12 +101,11 @@ let development_for_dir dir = false else let pref = String.sub d2 0 len1 in - pref = d1 + pref = d1 && (len1 = len2 || d2.[len1] = '/') in - (* it must be unique *) try Some (List.find (fun d -> is_prefix_of d.root dir) !developments) - with Not_found -> None + with Not_found | Failure _ -> None let development_for_name name = try @@ -321,12 +325,18 @@ let root_for_development development = development.root let name_for_development development = development.name let publish_development_bstract build clean devel = - let matita_flags = "\"-system\"" in + let matita_flags, matita_flags_system = + let orig_matita_flags = + try Sys.getenv "MATITA_FLAGS" with Not_found -> "" + in + "\"" ^ orig_matita_flags ^ "\"", "\"" ^ orig_matita_flags ^ " -system\"" + in HLog.message "cleaning the development before publishing"; - if clean ~matita_flags:"" devel then + if clean ~matita_flags devel then begin HLog.message "rebuilding the development in 'system' space"; - if build ~matita_flags devel then + (* here we should use pristine metadata if we use sqlite *) + if build ~matita_flags:matita_flags_system devel then begin HLog.message "publishing succeded"; true