aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorletouzey2011-12-21 23:16:36 +0000
committerletouzey2011-12-21 23:16:36 +0000
commitfdbb03f1047fc2ba36895c8ed3ffbc79bc7314e2 (patch)
tree3f13a09383cf0e0259e2591c788d0cf5756b136b
parentdc60a694607ec37687fb8d1aa474cae2e4479c00 (diff)
adapt myocamlbuild after changes in coqdep_boot (.beautify)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14839 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--myocamlbuild.ml18
1 files changed, 12 insertions, 6 deletions
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 73d30fe701..4bc34f1204 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -432,12 +432,18 @@ let extra_rules () = begin
let coq_build_dep f build =
(** NB: this relies on coqdep producing a single Makefile line
- for one .v file, with some specific shape : *)
- match string_list_of_file (f^".v.depends") with
- | vo::vg::v::deps when vo=f^".vo" && vg=f^".glob:" && v=f^".v" ->
- let d = List.map (fun x -> [x]) deps in
- List.iter Outcome.ignore_good (build d)
- | _ -> failwith ("Something wrong with dependencies of "^f^".v")
+ for one .v file, with some specific shape "f.vo ...: f.v deps.vo ..." *)
+ let src = f^".v" in
+ let depends = f^".v.depends" in
+ let rec get_deps keep = function
+ | [] -> []
+ | d::deps when d = src -> get_deps keep deps
+ | d::deps when keep -> [d] :: get_deps keep deps
+ | d::deps -> get_deps (String.contains d ':') deps
+ in
+ let d = get_deps false (string_list_of_file depends) in
+ List.iter Outcome.ignore_good (build d)
+
in
let coq_v_rule d init =