# 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
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
# 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
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@