[Pkg-ocaml-maint-commits] [SCM] oasis2debian project branch, master, updated. 94ae27000298101188a629fbcc6b28420021fe10
Sylvain Le Gall
gildor at debian.org
Sat Nov 20 00:58:49 UTC 2010
The following commit has been merged in the master branch:
commit a25ae3f094be1c2cc3200912b8f0ca553f842d33
Author: Sylvain Le Gall <gildor at debian.org>
Date: Fri Nov 19 11:42:38 2010 +0100
Use OPT: for debhelper files .in
diff --git a/src/BuildDepends.ml b/src/BuildDepends.ml
index aad09fb..2bf40c1 100644
--- a/src/BuildDepends.ml
+++ b/src/BuildDepends.ml
@@ -79,42 +79,60 @@ let get ~ctxt pkg =
in
let depends_of_arch arch acc =
+ let eval =
+ eval (`Only arch)
+ in
+
+ let add_tools tools exec =
+ List.fold_left
+ (fun exec ->
+ function
+ | ExternalTool nm ->
+ SetExec.add nm exec
+ | InternalExecutable _ ->
+ exec)
+ exec tools
+ in
+
let depends_of_bs bs ((exec, fndlb) as acc) =
- let eval =
- eval (`Only arch)
- in
- if eval bs.bs_build && eval bs.bs_install then
- begin
- let exec =
- List.fold_left
- (fun exec ->
- function
- | ExternalTool nm ->
- SetExec.add nm exec
- | InternalExecutable _ ->
- exec)
- exec
- bs.bs_build_tools
- in
+ if eval bs.bs_build then
+ begin
+ let exec =
+ add_tools bs.bs_build_tools exec
+ in
- let fndlb =
- List.fold_left
- (fun fndlb ->
- function
- | FindlibPackage (nm, ver_opt) ->
- SetFindlib.add (nm, ver_opt) fndlb
- | InternalLibrary _ ->
- fndlb)
- fndlb
- bs.bs_build_depends
- in
+ let fndlb =
+ List.fold_left
+ (fun fndlb ->
+ function
+ | FindlibPackage (nm, ver_opt) ->
+ SetFindlib.add (nm, ver_opt) fndlb
+ | InternalLibrary _ ->
+ fndlb)
+ fndlb
+ bs.bs_build_depends
+ in
- exec, fndlb
- end
- else
- begin
- acc
- end
+ exec, fndlb
+ end
+ else
+ begin
+ acc
+ end
+ in
+
+ let depends_of_doc doc ((exec, fndlb) as acc) =
+ if eval doc.doc_build then
+ add_tools doc.doc_build_tools exec, fndlb
+ else
+ acc
+ in
+
+ let depends_of_test test ((exec, fndlb) as acc) =
+ if eval test.test_run then
+ add_tools test.test_tools exec, fndlb
+ else
+ acc
in
List.fold_left
@@ -123,8 +141,14 @@ let get ~ctxt pkg =
| Library (_, bs, _)
| Executable (_, bs, _) ->
depends_of_bs bs acc
+
+ | Test (_, test) ->
+ depends_of_test test acc
+
+ | Doc (_, doc) ->
+ depends_of_doc doc acc
- | Flag _ | Test _ | SrcRepo _ | Doc _ ->
+ | Flag _ | SrcRepo _ ->
acc)
acc
pkg.sections
diff --git a/src/DhFiles.ml b/src/DhFiles.ml
index 7143dd8..5b39d5c 100644
--- a/src/DhFiles.ml
+++ b/src/DhFiles.ml
@@ -112,7 +112,7 @@ let create ~ctxt t =
"@OCamlStdlibDir@/$findlib_name/*.a")
else
(interpolate
- "#OPT: @OCamlStdlibDir@/$findlib_name/*.a"))
+ "OPT: @OCamlStdlibDir@/$findlib_name/*.a"))
chn)
roots);
--
oasis2debian project
More information about the Pkg-ocaml-maint-commits
mailing list