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

Mehdi Dogguy dogguy at pps.jussieu.fr
Fri Jul 24 15:08:41 UTC 2009


The following commit has been merged in the master branch:
commit 855823839dc1c67b53c9ae80987ba5711ca73ca2
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Fri Jul 24 15:48:34 2009 +0200

    Make ocaml.mk use dh_ocamldoc and dh_ocaml

diff --git a/cdbs/1/rules/ocaml.mk b/cdbs/1/rules/ocaml.mk
index 75ca731..7096f07 100644
--- a/cdbs/1/rules/ocaml.mk
+++ b/cdbs/1/rules/ocaml.mk
@@ -48,12 +48,6 @@ OCAML_LIB_PACKAGES ?= $(filter lib%-ocaml,$(DEB_PACKAGES))
 OCAML_OCAMLDOC_PACKAGES =
 #OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES)	# more "aggressive" default
 
-# space separated list of packages for which a pkg.doc-base.ocamldoc-apiref is
-# required. This file contains is the debian doc-base description of file which
-# should be located in the directory $(OCAML_OCAMLDOC_DESTDIR_HTML)
-# For debian/rules writers
-OCAML_OCAMLDOC_PACKAGES_DOCBASE =
-
 # to ensure invocations and tests on /usr/bin/ocaml* are meaningful
 CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ocaml-nox
 
@@ -67,38 +61,22 @@ endif
 
 # post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
 $(patsubst %,binary-install/%,$(DEB_PACKAGES))::
-	@OCAMLDOC="ocamldoc $(OCAML_OCAMLDOC_FLAGS)"; \
-	if test -n "$(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)" ; then \
-		if ! test -x "/usr/bin/ocamlfind"; then \
-			echo "OCamlfind flags set and no ocamlfind to be found" >&2; \
-			exit 1; \
-		fi; \
-		OCAMLDOC="ocamlfind $$OCAMLDOC $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)"; \
-	fi; \
-	OCAML_OCAMLDOC_INCLUDE=`for i in $(OCAML_OCAMLDOC_PACKAGES); do \
-					find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
-				done`; \
 	if (echo $(OCAML_OCAMLDOC_PACKAGES) | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-		echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
-		mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) ; \
-		echo 'invoking ocamldoc on debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ ...' ; \
-		find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
-			-type f -name '*.mli' -or -name '*.ml' \
-		| xargs $$OCAMLDOC $$OCAML_OCAMLDOC_INCLUDE \
-			-html $(OCAML_OCAMLDOC_FLAGS_HTML) \
-			-d debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) \
-		|| true ; \
+		dh_ocamldoc -v \
+		-u "$(OCAML_OCAMLDOC_FLAGS) $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)" \
+		-p $(cdbs_curpkg) ; \
 	fi
 
-# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages
-$(patsubst %,build/%,$(DEB_PACKAGES))::
-	@if (echo $(OCAML_OCAMLDOC_PACKAGES) $(OCAML_OCAMLDOC_PACKAGES_DOCBASE) \
-	  | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-	  	$(_cdbs_class_path)/ocamldoc-api-ref-config --doc-base-generate $(cdbs_curpkg) ; \
-	fi
+# Additional flags for dh_ocaml. Usefull to tell that some package do not export
+# some modules, or to override the runtime map (dev package -> runtime package)
+OCAML_DHOCAML_FLAGS =
+
+# Invoke dh_ocaml before building the deb
+$(patsubst %,binary-predeb/%,$(DEB_PACKAGES))::
+	dh_ocaml $(OCAML_DHOCAML_FLAGS)
 
 clean::
-	rm -f debian/*.doc-base.ocamldoc-apiref
+	rm -f debian/*.doc-base.apiref*
 
 # generate .in files counterpars before building, substituting @OCamlABI@
 # markers with the proper value; clean stamps after building

-- 
dh-ocaml packaging



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