- flags specific for the backend html/man
authorStefano Zacchiroli <zack@debian.org>
Mon, 27 Aug 2007 13:18:18 +0000 (13:18 +0000)
committerStefano Zacchiroli <zack@debian.org>
Mon, 27 Aug 2007 13:18:18 +0000 (13:18 +0000)
- preliminary support for manpage generation

debian/cdbs/ocaml-vars.mk
debian/cdbs/ocaml.mk

index 908b2bbf563507038d51ff491df5d6ce4ba093d9..e984b2f2f78847ac43de3fa7eda4abe7c9ac01bb 100644 (file)
@@ -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-vars.mk 4199 2007-08-27 13:08:35Z zack $
+# $Id: ocaml-vars.mk 4200 2007-08-27 13:18:18Z zack $
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
@@ -88,9 +88,17 @@ OCAML_LIB_PACKAGES := $(filter lib%-ocaml,$(DEB_PACKAGES))
 OCAML_OCAMLDOC_PACKAGES =
 #OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES)    # more "aggressive" default
 
-# flags to be passed to ocamldoc (in addition to -html and -d DESTDIR).
+# generic (i.e. non backend specific) flags to be passed to ocamldoc
 # For debian/rules writers
 OCAML_OCAMLDOC_FLAGS = -stars -m A
 
+# html-specific flags to be passed to ocamldoc (in addition to -html -d DESTDIR)
+# For debian/rules writers
+OCAML_OCAMLDOC_FLAGS_HTML =
+
+# man-specific flags to be passed to ocamldoc (in addition to -man -d DESTDIR)
+# For debian/rules writers
+OCAML_OCAMLDOC_FLAGS_MAN = -man-mini
+
 endif
 
index 315049b6611f3930fefef92cc67b70b3e776977a..16d66614898fef27eb73fead0a8622d5ebdcd78c 100644 (file)
@@ -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 4195 2007-08-27 08:58:20Z zack $
+# $Id: ocaml.mk 4200 2007-08-27 13:18:18Z zack $
 
 _cdbs_scripts_path ?= /usr/lib/cdbs
 _cdbs_rules_path ?= /usr/share/cdbs/1/rules
@@ -48,10 +48,19 @@ $(patsubst %,install/%,$(DEB_PACKAGES))::
                echo 'mkdir -p debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/html/api' ; \
                mkdir -p debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/html/api ; \
                echo 'invoking ocamldoc on debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ ...' ; \
+               # generate HTML documentation
                find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
                        -type f -name '*.mli' -or -name '*.ml' \
-               | xargs ocamldoc $(OCAML_OCAMLDOC_FLAGS) -html \
+               | xargs ocamldoc $(OCAML_OCAMLDOC_FLAGS) \
+                       -html $(OCAML_OCAMLDOC_FLAGS_HTML) \
                        -d debian/$(cdbs_curpkg)/usr/share/doc/$(cdbs_curpkg)/html/api ; \
+               ## generate manpages
+               ## XXX dumb: find for *.ml{i,} is executed twice
+               #find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
+               #       -type f -name '*.mli' -or -name '*.ml' \
+               #| xargs ocamldoc $(OCAML_OCAMLDOC_FLAGS) \
+               #       -man $(OCAML_OCAMLDOC_FLAGS_MAN) \
+               #       -d debian/$(cdbs_curpkg)/usr/share/man/... # TODO ; \
        fi
 
 # generate .in files counterpars before building, substituting @OCamlABI@