[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.5.0-17-gfce4e39

Sylvain Le Gall gildor at debian.org
Tue Jul 21 14:42:48 UTC 2009


The following commit has been merged in the master branch:
commit f6c537ec99368a071e1e9f03f57425439fa912ff
Author: Sylvain Le Gall <gildor at debian.org>
Date:   Mon Jul 20 18:57:54 2009 +0200

    Allow to define program through environment.

diff --git a/ocaml-md5sums/ocaml-md5sums b/ocaml-md5sums/ocaml-md5sums
index c2fcfeb..e8fb166 100755
--- a/ocaml-md5sums/ocaml-md5sums
+++ b/ocaml-md5sums/ocaml-md5sums
@@ -5,6 +5,12 @@ use strict;
 
 my $verbose = 0;
 
+# Executable called
+my $ocamlobjinfo=$ENV{OCAMLOBJINFO};
+$ocamlobjinfo="ocamlobjinfo" unless defined($ocamlobjinfo);
+my $ocamldumpapprox=$ENV{OCAMLDUMPAPPROX};
+$ocamldumpapprox="ocamldumpapprox" unless defined($ocamldumpapprox);
+
 use constant VERSION => "0.1";
 
 sub info 
@@ -92,8 +98,8 @@ sub add_object
 
   if ($obj_file =~ /.*\.(cmi|cmo|cma)/)
   {
-    main::info "Execute ocamlobjinfo $obj_file";
-    foreach (`ocamlobjinfo $obj_file`)
+    main::info "Execute $ocamlobjinfo $obj_file";
+    foreach (`$ocamlobjinfo $obj_file`)
     {
       chomp $_;
       main::debug "Input line: $_";
@@ -112,9 +118,9 @@ sub add_object
   }
   elsif ($obj_file =~ /.*\.(cmx|cmxa)/)
   {
-    main::info "Execute ocamldumpapprox $obj_file";
+    main::info "Execute $ocamldumpapprox $obj_file";
     my $interface;
-    foreach (`ocamldumpapprox $obj_file`)
+    foreach (`$ocamldumpapprox $obj_file`)
     {
       chomp $_;
       main::debug "Input line: $_";
@@ -329,11 +335,14 @@ sub print_depends
   {
     if ($self->{imported}{$_} eq "none")
     {
-      my ($unit_name) = $self->get_unit("imported", $_);
+      my ($unit_name, $md5) = $self->get_unit("imported", $_);
       warn $self->to_string().
            " doesn't resolve dependency on unit ".
            $unit_name.
-           "\n";
+           "\n" 
+           # MD5 = 0 means that we encounter an object which
+           # .cmxa has been used instead of its .cmx
+           unless $md5 eq "00000000000000000000000000000000";
     };
   };
 };

-- 
dh-ocaml packaging



More information about the Pkg-ocaml-maint-commits mailing list