[Pkg-ocaml-maint-commits] [SCM] Cooperative light-weight thread library for OCaml branch, master, updated. debian/2.1.1-1-10-ge5bbff5
Stephane Glondu
steph at glondu.net
Sat Jan 1 19:48:29 UTC 2011
The following commit has been merged in the master branch:
commit e8ee0f109f93098f7aac6c47e53a2abbebbf70f0
Author: Stephane Glondu <steph at glondu.net>
Date: Thu Dec 30 19:07:59 2010 +0100
Install *.cmx files and handle *.cmxa files more reliably
diff --git a/debian/modules.ml b/debian/modules.ml
index fb9b390..69f80c8 100644
--- a/debian/modules.ml
+++ b/debian/modules.ml
@@ -7,6 +7,7 @@
#require "pcre";;
let dll_dir = Sys.getenv "OCAML_DLL_DIR"
+let is_native = Sys.getenv "OCAML_HAVE_OCAMLOPT" = "yes"
let is_private = function
| "Pa_lwt_options" | "Lwt_log_rules" | "Lwt_ocaml_completion" | "Lwt_simple_top" -> true
@@ -47,7 +48,7 @@ let print_cma () cma =
let () = Printf.fprintf dev "%s\n" (chop_prefix cma) in
let () =
let x = Filename.chop_suffix cma ".cma" in
- if Sys.file_exists (x^".cmxa") then begin
+ if is_native then begin
Printf.fprintf dev "%s\n" (chop_prefix x ^ ".cmxa");
Printf.fprintf dev "%s\n" (chop_prefix x ^ ".a");
end
@@ -69,11 +70,12 @@ let print_cma () cma =
let dirname = Filename.dirname cma in
let print_module m =
let m = Filename.concat dirname (String.uncapitalize m) in
- let () =
- let x = m^".cmx" in
- if Sys.file_exists x then
- Printf.fprintf dev "%s\n" (chop_prefix x)
- in
+ let () = if is_native then begin
+ let x = Filename.basename (m^".cmx") in
+ match FileUtil.find (FileUtil.Basename_is x) "_build" (fun o x -> assert (o = None); Some x) None with
+ | Some x -> Printf.fprintf dev "%s %s\n" x (chop_prefix dirname)
+ | None -> assert false
+ end in
Printf.fprintf dev "%s\n" (chop_prefix (m^".cmi"));
Printf.fprintf dev "%s\n" (chop_prefix (m^".mli"))
in
diff --git a/debian/rules b/debian/rules
index 3c072de..4210d22 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,7 @@ DESTDIR=$(CURDIR)/debian/tmp
include /usr/share/ocaml/ocamlvars.mk
export OCAML_DLL_DIR
+export OCAML_HAVE_OCAMLOPT
export OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
export OCAMLFIND_LDCONF=ignore
--
Cooperative light-weight thread library for OCaml
More information about the Pkg-ocaml-maint-commits
mailing list