From: Stefano Zacchiroli Date: Sun, 2 Sep 2007 16:00:28 +0000 (+0000) Subject: - add support for automatic generation of doc-base entries for ocamldoc X-Git-Tag: archive/raspbian/4.08.1-4+rpi1~3^2~526 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3e24e34421f2380c07cd50fe4cae2bb062ae3e9c;p=ocaml.git - add support for automatic generation of doc-base entries for ocamldoc generated API reference --- diff --git a/debian/cdbs/ocaml-docbase-template.txt b/debian/cdbs/ocaml-docbase-template.txt new file mode 100644 index 00000000..d0deb550 --- /dev/null +++ b/debian/cdbs/ocaml-docbase-template.txt @@ -0,0 +1,8 @@ +Document: @PACKAGE@-ocamldoc-api-reference +Title: @PACKAGE@ OCamldoc API Reference +Abstract: API reference manual for @PACKAGE@ (generated via OCamldoc) +Section: Applications/Programming + +Format: HTML +Index: /usr/share/doc/@PACKAGE@/html/api/index.html +Files: /usr/share/doc/@PACKAGE@/html/api/* diff --git a/debian/cdbs/ocaml.mk b/debian/cdbs/ocaml.mk index 2a9fed97..6d938579 100644 --- a/debian/cdbs/ocaml.mk +++ b/debian/cdbs/ocaml.mk @@ -16,7 +16,7 @@ # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -# $Id: ocaml.mk 4266 2007-09-02 14:53:22Z zack $ +# $Id: ocaml.mk 4270 2007-09-02 16:00:28Z zack $ _cdbs_scripts_path ?= /usr/lib/cdbs _cdbs_rules_path ?= /usr/share/cdbs/1/rules @@ -42,7 +42,7 @@ DEB_DH_GENCONTROL_ARGS += -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)" endif -# post-install hooks for invoking ocamldoc on OCAML_OCAMLDOC_PACKAGES packages +# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages $(patsubst %,binary-install/%,$(DEB_PACKAGES)):: @if (echo $(OCAML_OCAMLDOC_PACKAGES) | grep -w '$(cdbs_curpkg)' > /dev/null) ; then \ echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \ @@ -56,6 +56,16 @@ $(patsubst %,binary-install/%,$(DEB_PACKAGES)):: || true ; \ fi +# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages +$(patsubst %,build/%,$(DEB_PACKAGES)):: + @if (echo $(OCAML_OCAMLDOC_PACKAGES) | grep -w '$(cdbs_curpkg)' > /dev/null) ; then \ + sed -e 's/@PACKAGE@/$(cdbs_curpkg)/g' \ + $(_cdbs_class_path)/ocaml-docbase-template.txt$(_cdbs_makefile_suffix) \ + > debian/$(cdbs_curpkg).doc-base.ocamldoc-apiref ; \ + fi +clean:: + rm -f debian/*.doc-base.ocamldoc-apiref + # generate .in files counterpars before building, substituting @OCamlABI@ # markers with the proper value; clean stamps after building pre-build:: ocamlinit diff --git a/debian/changelog b/debian/changelog index 71ebcf6f..48fa690c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,10 @@ ocaml (3.10.0-8) UNRELEASED; urgency=low * CDBS class - invoke ocamldoc after dh_install has been run (otherwise ocamldoc is likely to generate empty API references ...) + - add support for automatic generation of doc-base entries for ocamldoc + generated API reference - -- Stefano Zacchiroli Sun, 02 Sep 2007 16:51:41 +0200 + -- Stefano Zacchiroli Sun, 02 Sep 2007 17:49:36 +0200 ocaml (3.10.0-7) unstable; urgency=low diff --git a/debian/ocaml-nox.install.in b/debian/ocaml-nox.install.in index 45b43d77..257884c0 100644 --- a/debian/ocaml-nox.install.in +++ b/debian/ocaml-nox.install.in @@ -1,4 +1,4 @@ -debian/cdbs/*.mk /usr/share/cdbs/1/class/ +debian/cdbs/* /usr/share/cdbs/1/class/ debian/ocaml-nox.override /usr/share/lintian/overrides/ocaml-nox config/Makefile /usr/lib/ocaml/#OcamlABI#/config/Makefile debian/native-archs /usr/lib/ocaml/#OcamlABI#/