[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, 312/master, updated. debian/3.11.2-1-27-gfa428fd

Stephane Glondu steph at glondu.net
Thu Jun 17 05:36:06 UTC 2010


The following commit has been merged in the 312/master branch:
commit 3cfa7906ee0c2f0168ff01083f95ac6780795aec
Author: Stephane Glondu <steph at glondu.net>
Date:   Tue Jun 8 11:58:31 2010 +0200

    Remove ocaml{byte,plugin}info, merged upstream into ocamlobjinfo

diff --git a/debian/control b/debian/control
index 4fb9b7a..4862847 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Uploaders:
 Build-Depends:
  debhelper (>= 7.1.0~),
  autotools-dev,
+ binutils-dev,
  tcl8.5-dev,
  tk8.5-dev,
  libncurses5-dev,
diff --git a/debian/man/ocamlbyteinfo.1 b/debian/man/ocamlbyteinfo.1
deleted file mode 100644
index d091292..0000000
--- a/debian/man/ocamlbyteinfo.1
+++ /dev/null
@@ -1,26 +0,0 @@
-.TH OCAMLBYTEINFO 1 "July 21, 2009"
-.SH NAME
-ocamlbyteinfo \- dump an OCaml bytecode binary description
-.SH SYNOPSIS
-.B ocamlbyteinfo
-.RI file
-.SH DESCRIPTION
-Dump information contained in OCaml bytecode binary.
-.sp 2
-.B ocamlbyteinfo
-is able to show information regarding:
-.br
-.IP
-CRC of implementation
-.sp 2
-unsafe features
-.SH SEE ALSO
-.BR ocamlc (1),
-.BR ocamlopt (1),
-.BR ocamlobjinfo (1),
-.BR ocamlplugininfo (1),
-.BR ocamldumpapprox (1)
-.br
-.SH AUTHOR
-This manual page was written by Mehdi Dogguy <mehdi at dogguy.org>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/man/ocamldumpapprox.1 b/debian/man/ocamldumpapprox.1
deleted file mode 100644
index 54dadf0..0000000
--- a/debian/man/ocamldumpapprox.1
+++ /dev/null
@@ -1,29 +0,0 @@
-.TH OCAMLDUMPAPPROX 1 "February 15, 2009"
-.SH NAME
-ocamldumpapprox \- dump an OCaml native compilation unit description
-.SH SYNOPSIS
-.B ocamldumpapprox
-.RI file\ ...
-.SH DESCRIPTION
-Dump information contained in OCaml native compilation units.
-It works on .cmx and .cmxa files.
-.sp 2
-.B ocamldumpapprox
-is able to show information regarding:
-.br
-.IP
-CRC of implementation
-.sp 2
-CRC of imported interfaces and implementations
-.sp 2
-implementation assumptions
-.PP
-depending on its invocation on .cmx or .cmxa arguments.
-.SH SEE ALSO
-.BR ocamlc (1),
-.BR ocamlopt (1),
-.BR ocamlobjinfo (1)
-.br
-.SH AUTHOR
-This manual page was written by Stéphane Glondu <steph at glondu.net>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/man/ocamlobjinfo.1 b/debian/man/ocamlobjinfo.1
index b12f7a1..b728e80 100644
--- a/debian/man/ocamlobjinfo.1
+++ b/debian/man/ocamlobjinfo.1
@@ -1,12 +1,13 @@
-.TH OCAMLOBJINFO 1 "October 26, 2002"
+.TH OCAMLOBJINFO 1 "June 9, 2010"
 .SH NAME
-ocamlobjinfo \- dump an OCaml compilation unit description
+ocamlobjinfo \- dump information about OCaml compiled objects
 .SH SYNOPSIS
 .B ocamlobjinfo
 .RI file\ ...
 .SH DESCRIPTION
-Dump information contained in OCaml compilation units.
-Currently it works on .cmi, .cmo and .cma files.
+Dump information contained in OCaml compiled objects. It works
+on .cmi, .cmo, .cma, .cmx, .cmxa, .cmxs files and pure bytecode
+executables.
 .sp 2
 .B ocamlobjinfo
 is able to show information regarding:
@@ -14,7 +15,7 @@ is able to show information regarding:
 .IP
 module names
 .sp 2
-unit name
+unit names
 .sp 2
 declared primitives
 .sp 2
@@ -30,11 +31,12 @@ extra C flags needed
 .sp 2
 use of unsafe features
 .PP
-depending on its invocation on .cmi, .cmo or .cma arguments.
+depending on its arguments.
 .SH SEE ALSO
 .BR ocamlc (1),
 .BR ocamlopt (1)
 .br
 .SH AUTHOR
-This manual page was written by Stefano Zacchiroli <zack at debian.org>,
-for the Debian GNU/Linux system (but may be used by others).
+This manual page was written by Stefano Zacchiroli <zack at debian.org>
+and Stéphane Glondu <glondu at debian.org>, for the Debian GNU/Linux
+system (but may be used by others).
diff --git a/debian/man/ocamlplugininfo.1 b/debian/man/ocamlplugininfo.1
deleted file mode 100644
index 45ff30c..0000000
--- a/debian/man/ocamlplugininfo.1
+++ /dev/null
@@ -1,27 +0,0 @@
-.TH OCAMLPLUGININFO 1 "July 21, 2009"
-.SH NAME
-ocamlplugininfo \- dump an OCaml native shared object file description
-.SH SYNOPSIS
-.B ocamlplugininfo
-.RI file
-.SH DESCRIPTION
-Dump information contained in OCaml native sahred object.
-It works on .cmxs files.
-.sp 2
-.B ocamlplugininfo
-is able to show information regarding:
-.br
-.IP
-CRC of implementation
-.sp 2
-CRC of imported interfaces and implementations
-.SH SEE ALSO
-.BR ocamlc (1),
-.BR ocamlopt (1),
-.BR ocamlobjinfo (1),
-.BR ocamlbyteinfo (1),
-.BR ocamldumpapprox (1)
-.br
-.SH AUTHOR
-This manual page was written by Mehdi Dogguy <mehdi at dogguy.org>,
-for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/ocaml-nox.install.in b/debian/ocaml-nox.install.in
index df89d28..1fa3ac6 100644
--- a/debian/ocaml-nox.install.in
+++ b/debian/ocaml-nox.install.in
@@ -10,6 +10,8 @@
      usr/bin/ocamlmktop
      usr/bin/ocamlprof
      usr/bin/ocamlyacc
+     usr/bin/ocamlobjinfo
+     @OCamlStdlibDir@/objinfo_helper
      debian/native-archs @OCamlStdlibDir@
 OPT: usr/bin/ocamlbuild.native
 OPT: usr/bin/ocamlopt
diff --git a/debian/ocaml-nox.manpages.in b/debian/ocaml-nox.manpages.in
index 041b8bc..5ed3961 100644
--- a/debian/ocaml-nox.manpages.in
+++ b/debian/ocaml-nox.manpages.in
@@ -1,6 +1,3 @@
 debian/man/ocamlmklib.1
 debian/man/ocamldumpobj.1
 debian/man/ocamlobjinfo.1
-debian/man/ocamlbyteinfo.1
-OPT: debian/man/ocamldumpapprox.1
-OPT: debian/man/ocamlplugininfo.1
diff --git a/debian/ocamlbyteinfo/Makefile b/debian/ocamlbyteinfo/Makefile
deleted file mode 100644
index 9f5bf62..0000000
--- a/debian/ocamlbyteinfo/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-
-DIR=debian/ocamlbyteinfo
-BEXE=ocamlbyteinfo
-NEXE=ocamlplugininfo
-OCAMLC=./boot/ocamlrun ./ocamlc
-OCAMLOPT=./boot/ocamlrun ./ocamlopt
-OCAMLLEX=./boot/ocamlrun ./lex/ocamllex
-
-GENERATED=$(BEXE) $(NEXE) *.cm* natdynlink.* *.a *.o
-
-BDEPS=otherlibs/dynlink/dynlinkaux.cmo
-NDEPS=$(DIR)/natdynlink.cmxa
-INCLUDES= -I stdlib -I utils -I typing -I bytecomp -I $(DIR) \
-  -I otherlibs/dynlink -I otherlibs/unix -I otherlibs/str
-
-all: $(BEXE) $(NEXE)
-
-$(DIR)/natdynlink.ml:
-	cp otherlibs/dynlink/natdynlink.ml $(DIR)/
-
-$(DIR)/natdynlink.cmx: $(DIR)/natdynlink.ml
-	$(OCAMLOPT) -c $(INCLUDES) $(DIR)/natdynlink.ml
-
-$(DIR)/natdynlink.cmxa: $(DIR)/natdynlink.cmx
-	$(OCAMLOPT) $(INCLUDES) -ccopt "-Wl,-E" $^ -a -o $@
-
-$(NEXE): $(NDEPS)
-	$(OCAMLOPT) unix.cmxa str.cmxa -o $(DIR)/$(NEXE) $(INCLUDES) $(NDEPS) $(DIR)/$(NEXE).ml
-
-$(BEXE): $(BDEPS)
-	$(OCAMLC) -o $(DIR)/$(BEXE) $(INCLUDES) $(BDEPS) $(DIR)/$(BEXE).ml
-
-clean:
-	rm -f $(addprefix $(DIR)/, $(GENERATED))
diff --git a/debian/ocamlbyteinfo/ocamlbyteinfo.ml b/debian/ocamlbyteinfo/ocamlbyteinfo.ml
deleted file mode 100644
index eb9a293..0000000
--- a/debian/ocamlbyteinfo/ocamlbyteinfo.ml
+++ /dev/null
@@ -1,101 +0,0 @@
-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Xavier Leroy, projet Gallium, INRIA Rocquencourt         *)
-(*                                                                     *)
-(*  Copyright 2009 Institut National de Recherche en Informatique et   *)
-(*  en Automatique.  All rights reserved.  This file is distributed    *)
-(*  under the terms of the GNU Library General Public License, with    *)
-(*  the special exception on linking described in file ../../LICENSE.  *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id$ *)
-
-(* Dumps a bytecode binary file *)
-
-open Sys
-open Dynlinkaux
-
-let input_stringlist ic len =
-  let get_string_list sect len =
-    let rec fold s e acc =
-      if e != len then
-        if sect.[e] = '\000' then
-          fold (e+1) (e+1) (String.sub sect s (e-s) :: acc)
-        else fold s (e+1) acc
-      else acc
-    in fold 0 0 []
-  in
-  let sect = String.create len in
-  let _ = really_input ic sect 0 len in
-  get_string_list sect len
-
-let print = Printf.printf
-let perr s =
-  Printf.eprintf "%s\n" s;
-  exit(1)
-let p_title title = print "%s:\n" title
-
-let p_section title format pdata = function
-  | [] -> ()
-  | l ->
-      p_title title;
-      List.iter
-        (fun (name, data) -> print format (pdata data) name)
-        l
-
-let p_list title format = function
-  | [] -> ()
-  | l ->
-      p_title title;
-      List.iter
-        (fun name -> print format name)
-        l
-
-let _ =
-  try
-    let input_name = Sys.argv.(1) in
-    let ic = open_in_bin input_name in
-    Bytesections.read_toc ic;
-    List.iter
-      (fun section ->
-         try
-           let len = Bytesections.seek_section ic section in
-           if len > 0 then match section with
-             | "CRCS" ->
-                 p_section
-                   "Imported Units"
-                   "\t%s\t%s\n"
-                   Digest.to_hex
-                   (input_value ic : (string * Digest.t) list)
-             | "DLLS" ->
-                 p_list
-                   "Used Dlls" "\t%s\n"
-                   (input_stringlist ic len)
-             | "DLPT" ->
-                 p_list
-                   "Additional Dll paths"
-                   "\t%s\n"
-                   (input_stringlist ic len)
-             | "PRIM" ->
-                 let prims = (input_stringlist ic len) in
-                 print "Uses unsafe features: ";
-                 begin match prims with
-                     [] -> print "no\n"
-                   | l  -> print "YES\n";
-                       p_list "Primitives declared in this module"
-                         "\t%s\n"
-                         l
-                 end
-             | _ -> ()
-         with Not_found | Failure _ | Invalid_argument _ -> ()
-      )
-      ["CRCS"; "DLLS"; "DLPT"; "PRIM"];
-    close_in ic
-  with
-    | Sys_error msg ->
-        perr msg
-    | Invalid_argument("index out of bounds") ->
-        perr (Printf.sprintf "Usage: %s filename" Sys.argv.(0))
diff --git a/debian/ocamlbyteinfo/ocamlplugininfo.ml b/debian/ocamlbyteinfo/ocamlplugininfo.ml
deleted file mode 100644
index e28800f..0000000
--- a/debian/ocamlbyteinfo/ocamlplugininfo.ml
+++ /dev/null
@@ -1,109 +0,0 @@
-(***********************************************************************)
-(*                                                                     *)
-(*                           Objective Caml                            *)
-(*                                                                     *)
-(*            Xavier Leroy, projet Gallium, INRIA Rocquencourt         *)
-(*                                                                     *)
-(*  Copyright 2009 Institut National de Recherche en Informatique et   *)
-(*  en Automatique.  All rights reserved.  This file is distributed    *)
-(*  under the terms of the GNU Library General Public License, with    *)
-(*  the special exception on linking described in file ../../LICENSE.  *)
-(*                                                                     *)
-(***********************************************************************)
-
-(* $Id$ *)
-
-(* Dumps a .cmxs file *)
-
-open Natdynlink
-open Format
-
-let file =
-  try
-    Sys.argv.(1)
-  with _ -> begin
-    Printf.eprintf "Usage: %s file.cmxs\n" Sys.argv.(0);
-    exit(1)
-  end
-
-exception Abnormal_exit
-
-let error s e =
-  let eprint = Printf.eprintf in
-  let print_exc s = function
-    | End_of_file ->
-       eprint "%s: %s\n" s file
-    | Abnormal_exit ->
-        eprint "%s\n" s
-    | e -> eprint "%s\n" (Printexc.to_string e)
-  in
-    print_exc s e;
-    exit(1)
-
-let read_in command =
-  let cmd = Printf.sprintf command file in
-  let ic = Unix.open_process_in cmd in
-  try
-    let line = input_line ic in
-    begin match (Unix.close_process_in ic) with
-      | Unix.WEXITED 0 -> Str.split (Str.regexp "[ ]+") line
-      | Unix.WEXITED _  | Unix.WSIGNALED _ | Unix.WSTOPPED _ ->
-          error
-            (Printf.sprintf
-               "Command \"%s\" exited abnormally"
-               cmd
-            )
-            Abnormal_exit
-    end
-  with e -> error "File is empty" e
-
-let get_offset adr_off adr_sec =
-  try
-    let adr = List.nth adr_off 4 in
-    let off = List.nth adr_off 5 in
-    let sec = List.hd adr_sec in
-
-    let (!) x = Int64.of_string ("0x" ^ x) in
-    let (+) = Int64.add in
-    let (-) = Int64.sub in
-
-      Int64.to_int (!off + !sec - !adr)
-
-  with Failure _ | Invalid_argument _ ->
-    error
-      "Command output doesn't have the expected format"
-      Abnormal_exit
-
-let print_infos name crc defines cmi cmx =
-  let print_name_crc (name, crc) =
-    printf "@ %s (%s)" name (Digest.to_hex crc)
-  in
-  let pr_imports ppf imps = List.iter print_name_crc imps in
-  printf "Name: %s at ." name;
-  printf "CRC of implementation: %s at ." (Digest.to_hex crc);
-  printf "@[<hov 2>Globals defined:";
-  List.iter (fun s -> printf "@ %s" s) defines;
-  printf "@]@.";
-  printf "@[<v 2>Interfaces imported:%a@]@." pr_imports cmi;
-  printf "@[<v 2>Implementations imported:%a@]@." pr_imports cmx
-
-let _ =
-  let adr_off = read_in "objdump -h %s | grep ' .data '" in
-  let adr_sec = read_in "objdump -T %s | grep ' caml_plugin_header$'" in
-
-  let ic = open_in file in
-  let _ = seek_in ic (get_offset adr_off adr_sec) in
-  let header  = (input_value ic : Natdynlink.dynheader) in
-    if header.magic <> Natdynlink.dyn_magic_number then
-      raise(Error(Natdynlink.Not_a_bytecode_file file))
-    else begin
-      List.iter
-        (fun ui ->
-           print_infos
-             ui.name
-             ui.crc
-             ui.defines
-             ui.imports_cmi
-             ui.imports_cmx)
-        header.units
-    end
diff --git a/debian/rules b/debian/rules
index da7531d..5d28c90 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,14 +26,7 @@ DISTDIR = $(PACKAGE)-$(OCAML_ABI)
 SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar.bz2
 
 # Environment variable for dh_ocaml
-OCAMLBYTEINFO = boot/ocamlrun debian/ocamlbyteinfo/ocamlbyteinfo
-OCAMLPLUGININFO = debian/ocamlbyteinfo/ocamlplugininfo
-OCAMLDUMPAPPROX = boot/ocamlrun tools/dumpapprox
-OCAMLOBJINFO = boot/ocamlrun tools/objinfo
-export OCAMLBYTEINFO
-export OCAMLPLUGININFO
-export OCAMLDUMPAPPROX
-export OCAMLOBJINFO
+export OCAMLOBJINFO = OCAMLLIB=tools boot/ocamlrun tools/objinfo
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
@@ -117,23 +110,18 @@ build-stamp: config-stamp
 ifeq ($(BUILDCACHE),)
 	$(MAKE) world
 	$(MAKE) bootstrap
-	$(MAKE) -C tools objinfo dumpobj
 ifeq (,$(OCAML_OPT_ARCH))
 # As of 3.11.0, manpages are made only in `make opt.opt'
 	make -C ocamldoc manpages \
 	  OCAMLDOC_RUN="../boot/ocamlrun -I ../otherlibs/unix -I ../otherlibs/str ./ocamldoc"
-	$(MAKE) -f debian/ocamlbyteinfo/Makefile ocamlbyteinfo
 else
 	@echo "Building native compilers"
 	$(MAKE) opt opt.opt
-	$(MAKE) -C tools dumpapprox
-	$(MAKE) -f debian/ocamlbyteinfo/Makefile
 	touch opt-built-stamp
 endif
 else
 	@echo "===> WARNING: $(BUILDCACHE) detected, compilation skipped! <==="
 	rsync -a --exclude=debian --exclude=.git $(BUILDCACHE)/ .
-	rsync -a $(BUILDCACHE)/debian/ocamlbyteinfo/ debian/ocamlbyteinfo/
 	rm -f build-stamp install-stamp
 endif
 	touch $@
@@ -159,7 +147,6 @@ endif
 	fi
 # Remaining stuff
 	-rm -Rf debian/$(SRCTARBALL) debian/examples
-	$(MAKE) -f debian/ocamlbyteinfo/Makefile clean
 
 .PHONY: override_dh_auto_install
 override_dh_auto_install: install-stamp
@@ -194,16 +181,6 @@ endif
 # Install additional files not handled by dh_install
 # Beware: dh_install does not handle renamings, please pay attention
 	cp otherlibs/labltk/README debian/ocaml/usr/share/doc/ocaml/README.labltk
-	for u in dumpobj objinfo dumpapprox; do \
-	  if [ -f tools/$$u ]; then \
-	    cp tools/$$u debian/ocaml-nox/usr/bin/ocaml$$u; \
-	  fi \
-	done
-	for u in ocamlbyteinfo ocamlplugininfo; do \
-	  if [ -f debian/ocamlbyteinfo/$$u ]; then \
-	    cp debian/ocamlbyteinfo/$$u debian/ocaml-nox/usr/bin/$$u; \
-	  fi \
-	done
 	for mli in `find camlp4 -name '*.mli'` ; do \
 	  cp --parents $$mli debian/camlp4$(OCAML_STDLIB_DIR); \
 	done

-- 
OCaml packaging



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