aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-01-29 17:27:49 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-01-29 18:03:50 +0100
commit0b644da20c714b01565f88dffcfd51ea8f08314a (patch)
tree5a63fe126f7ae1f5d0e9460234291dd3dd55a78b /tools
parent4953a129858a231e64dec636a3bc15a54a0e771c (diff)
parent22a2cc1897f0d9f568ebfb807673e84f6ada491a (diff)
Merge branch 'v8.5'
Diffstat (limited to 'tools')
-rw-r--r--tools/coq_makefile.ml8
-rw-r--r--tools/coqdep_common.ml8
2 files changed, 11 insertions, 5 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml
index f9bff3ac9..147759f5f 100644
--- a/tools/coq_makefile.ml
+++ b/tools/coq_makefile.ml
@@ -99,7 +99,13 @@ let string_prefix a b =
let is_prefix dir1 dir2 =
let l1 = String.length dir1 in
let l2 = String.length dir2 in
- dir1 = dir2 || (l1 < l2 && String.sub dir2 0 l1 = dir1 && dir2.[l1] = '/')
+ let sep = Filename.dir_sep in
+ if dir1 = dir2 then true
+ else if l1 + String.length sep <= l2 then
+ let dir1' = String.sub dir2 0 l1 in
+ let sep' = String.sub dir2 l1 (String.length sep) in
+ dir1' = dir1 && sep' = sep
+ else false
let physical_dir_of_logical_dir ldir =
let le = String.length ldir - 1 in
diff --git a/tools/coqdep_common.ml b/tools/coqdep_common.ml
index f5eccbfa4..c63e4aaa6 100644
--- a/tools/coqdep_common.ml
+++ b/tools/coqdep_common.ml
@@ -489,15 +489,15 @@ let add_caml_known phys_dir _ f =
| _ -> ()
let add_coqlib_known recur phys_dir log_dir f =
- match get_extension f [".vo"] with
- | (basename,".vo") ->
+ match get_extension f [".vo"; ".vio"] with
+ | (basename, (".vo" | ".vio")) ->
let name = log_dir@[basename] in
let paths = if recur then suffixes name else [name] in
List.iter (fun f -> Hashtbl.add coqlibKnown f ()) paths
| _ -> ()
let add_known recur phys_dir log_dir f =
- match get_extension f [".v";".vo"] with
+ match get_extension f [".v"; ".vo"; ".vio"] with
| (basename,".v") ->
let name = log_dir@[basename] in
let file = phys_dir//basename in
@@ -506,7 +506,7 @@ let add_known recur phys_dir log_dir f =
let paths = List.tl (suffixes name) in
let iter n = safe_hash_add compare_file clash_v vKnown (n, (file, false)) in
List.iter iter paths
- | (basename,".vo") when not(!option_boot) ->
+ | (basename, (".vo" | ".vio")) when not(!option_boot) ->
let name = log_dir@[basename] in
let paths = if recur then suffixes name else [name] in
List.iter (fun f -> Hashtbl.add coqlibKnown f ()) paths