[Pkg-ocaml-maint-commits] [SCM] ssreflect packaging branch, master, updated. debian/1.3pl1-3-3-g0aa06f9

Stephane Glondu steph at glondu.net
Sun Apr 24 13:13:25 UTC 2011


The following commit has been merged in the master branch:
commit 74825ecc4937768bf1ec8105d2626eaa4fd1b2cb
Author: Stephane Glondu <steph at glondu.net>
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 COQLIB := $(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
+endif
+ifeq ($(OCAML_NATDYNLINK),yes)
+	PLUGIN_TARGETS += src/ssreflect.cmxs
+endif
+
 %:
 	+dh --with ocaml $@
 
 .PHONY: override_dh_auto_build
 override_dh_auto_build:
-	$(MAKE) all
-	$(MAKE) -f Makefile.coq html
 
+.PHONY: override_dh_auto_test
+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
 override_dh_auto_install:
+	$(MAKE) Makefile.coq
+ifeq ($(findstring libssreflect-coq,$(PACKAGES)),)
+	mkdir -p bin
+	$(MAKE) -f Makefile.coq $(PLUGIN_TARGETS)
+else
+	$(MAKE) all
+	$(MAKE) -f Makefile.coq html
+endif
 
 .PHONY: override_dh_auto_clean
 override_dh_auto_clean:

-- 
ssreflect packaging



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