The following commit has been merged in the master branch:
commit 74825ecc4937768bf1ec8105d2626eaa4fd1b2cb
Author: Stephane Glondu <>
Date:   Sun Apr 24 13:20:51 2011 +0200

    Build theories only when explicitly asked
    Theories (which are arch:all) are very long to compile on some
    architectures (more than 10 hours on mips*), so let's just not compile
    them when not asked. Since there is no way to know if arch:all
    packages are being built from the build target, the building is done
    in install. Ugly, but see #604397.
    As a side-effect, disable dh_auto_test (since its run before install).

diff --git a/debian/rules b/debian/rules
index 938e2c2..148ad34 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,16 +7,38 @@ export COQTOP := $(COQ_STDLIB_DIR)
 export COQBIN := /usr/bin/
+PACKAGES := $(shell dh_listpackages)
+PLUGIN_TARGETS := src/ssreflect.cmo
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+       PLUGIN_TARGETS += src/ssreflect.cmx
+ifeq ($(OCAML_NATDYNLINK),yes)
+       PLUGIN_TARGETS += src/ssreflect.cmxs
        +dh --with ocaml $@
 .PHONY: override_dh_auto_build
-       $(MAKE) all
-       $(MAKE) -f Makefile.coq html
+.PHONY: override_dh_auto_test
+# Building is done here because dh_listpackages is useless in the
+# build target. Should be reconsidered when dpkg-buildpackage starts
+# calling build-{arch,indep} targets (see #604397)
 .PHONY: override_dh_auto_install
+       $(MAKE) Makefile.coq
+ifeq ($(findstring libssreflect-coq,$(PACKAGES)),)
+       mkdir -p bin
+       $(MAKE) -f Makefile.coq $(PLUGIN_TARGETS)
+       $(MAKE) all
+       $(MAKE) -f Makefile.coq html
 .PHONY: override_dh_auto_clean

ssreflect packaging

Pkg-ocaml-maint-commits mailing list

Reply via email to