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

Stephane Glondu steph at glondu.net
Sun Jul 26 00:41:45 UTC 2009


The following commit has been merged in the master branch:
commit 0654ed872ca4f649e24abce41dfa8232bdfb33a9
Author: Stephane Glondu <steph at glondu.net>
Date:   Sun Jul 26 02:25:14 2009 +0200

    Fixup cdbs/dpatch/dh_ocaml interaction mess (hopefully)
    
    In order to have dh_clean called after unpatching, it seems that
    dpatch.mk must be included before debhelper.mk, and debhelper.mk must
    be included before ocaml.mk to have dh_ocaml called at the right time.
    But this way, dh_clean is called before dh_ocamlinit -d, so we manage
    to avoid creation of log by using inhibit_log() in dh_ocamlinit.

diff --git a/cdbs/1/rules/ocaml.mk b/cdbs/1/rules/ocaml.mk
index 34fc79b..5f78a5d 100644
--- a/cdbs/1/rules/ocaml.mk
+++ b/cdbs/1/rules/ocaml.mk
@@ -18,6 +18,8 @@
 #
 # $Id: ocaml.mk 4944 2007-12-28 14:50:46Z zack $
 
+# Includes must be in this order: dpatch.mk, debhelper.mk, ocaml.mk
+
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
 _cdbs_class_path ?= /usr/share/cdbs/1/class
@@ -80,16 +82,20 @@ clean::
 
 # generate .in files counterpars before building, substituting @OCamlABI@
 # markers with the proper value; clean stamps after building
-dh-ocamlinit:
+ocamlinit-stamp:
 	dh_ocamlinit
-dh-ocamlinit-clean: unpatch
+
+.PHONY: ocamlinit-clean
+ocamlinit-clean:
 	dh_ocamlinit -d
 
-pre-build:: dh-ocamlinit
-clean:: dh-ocamlinit-clean
+pre-build:: ocamlinit-stamp
+clean:: ocamlinit-clean
 
-# avoid dpatch breaking upon clean if debian/patches/*.in files are in use
-deapply-dpatches: dh-ocamlinit
+# Interaction with patch systems
+ocamlinit-clean: $(_cdbs_dpatch_unapply_rule) $(_cdbs_patch_system_unapply_rule)
+$(_cdbs_dpatch_unapply_rule): ocamlinit-stamp
+$(_cdbs_patch_system_unapply_rule): ocamlinit-stamp
 
 # update debian/control substituting @OCamlNativeArchs@
 # XXX ASSUMPTION: debian/control has already been generated, i.e. this rule is
diff --git a/debhelper/dh_ocamlinit b/debhelper/dh_ocamlinit
index 5d25971..ba7b118 100755
--- a/debhelper/dh_ocamlinit
+++ b/debhelper/dh_ocamlinit
@@ -63,6 +63,7 @@ my @ocaml_in_files = split /\n/,
     `find debian/ -type f -name "*.in" -not \\( -name control\.in \\) | sed 's/.in\$//'`;
 
 if (defined($dh{D_FLAG})) {
+    inhibit_log();
     complex_doit("rm -f ocamlinit-stamp @ocaml_in_files");
     exit;
 }
@@ -96,4 +97,3 @@ This program is meant to be used together with debhelper.
 Mehdi Dogguy <mehdi at dogguy.org>
 
 =cut
-

-- 
dh-ocaml packaging



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