From 10ae94c252bfc3e744407115274fd3d92957d026 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Use ocamldoc in each directory. --- Make.rules.in | 14 ++++++++++++++ Makefile.in | 17 +---------------- diskzip/Makefile.in | 3 +++ lib/Makefile.in | 3 +++ virt-df/Makefile.in | 4 ++++ 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 38dc389..484d562 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -23,6 +23,9 @@ OCAMLDEP = @OCAMLDEP@ OCAMLC = @OCAMLC@ OCAMLOPT = @OCAMLOPT@ +OCAMLDOC = @OCAMLDOC@ +OCAMLDOCFLAGS += -html -sort + # Common rules for building OCaml objects. ifneq ($(OCAMLFIND),) @@ -64,6 +67,17 @@ ifeq ($(wildcard .depend),.depend) include .depend endif +# Developer documentation (in html/ subdirectory). + +ifneq ($(OCAMLDOC),) +ifneq ($(OCAMLDOCFILES),) +doc: + rm -rf html + mkdir html + -$(OCAMLDOC) $(OCAMLDOCFLAGS) -d html $(OCAMLDOCFILES) +endif +endif + .PHONY: depend dist check-manifest dpkg doc .SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly diff --git a/Makefile.in b/Makefile.in index 1ebe823..d2a3cde 100644 --- a/Makefile.in +++ b/Makefile.in @@ -21,12 +21,9 @@ VERSION = @PACKAGE_VERSION@ INSTALL = @INSTALL@ -OCAMLDOC = @OCAMLDOC@ -OCAMLDOCFLAGS := -html -sort - SUBDIRS = lib virt-df diskzip -all opt depend install: +all opt depend install doc: for d in $(SUBDIRS); do \ $(MAKE) -C $$d $@; \ if [ $$? -ne 0 ]; then exit 1; fi; \ @@ -45,18 +42,6 @@ distclean: clean rm -f Makefile rm -f virt-df/Makefile -# Developer documentation (in html/ subdirectory). - -ifneq ($(OCAMLDOC),) -doc: - rm -rf html - mkdir html - -cd lib; \ - $(OCAMLDOC) $(OCAMLDOCFLAGS) -d ../html \ - -I +extlib -I +bitmatch \ - int63.mli diskimage.mli diskimage.ml -endif - # Distribution. dist: diff --git a/diskzip/Makefile.in b/diskzip/Makefile.in index 39ef864..b1fa222 100644 --- a/diskzip/Makefile.in +++ b/diskzip/Makefile.in @@ -51,6 +51,9 @@ OCAMLOPTLIBS := -linkpkg bitmatch.cmxa diskimage.cmxa OCAMLDEPFLAGS := $(SYNTAX) +OCAMLDOCFLAGS := $(SYNTAX) -I +extlib -I +bitmatch -I ../lib +OCAMLDOCFILES := diskzip.ml + BYTE_TARGETS := diskzip OPT_TARGETS := diskzip.opt diff --git a/lib/Makefile.in b/lib/Makefile.in index 806e0d7..b42a55c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -66,6 +66,9 @@ OCAMLOPTLIBS := -linkpkg bitmatch.cmxa OCAMLDEPFLAGS := $(SYNTAX) +OCAMLDOCFLAGS += $(SYNTAX) -I +extlib -I +bitmatch +OCAMLDOCFILES := int63.mli diskimage.mli diskimage.ml + BYTE_TARGETS := diskimage.cma OPT_TARGETS := diskimage.cmxa diff --git a/virt-df/Makefile.in b/virt-df/Makefile.in index 7d3490a..42033a4 100644 --- a/virt-df/Makefile.in +++ b/virt-df/Makefile.in @@ -35,6 +35,10 @@ ifneq ($(pkg_gettext),no) OCAMLCPACKAGES += -package gettext-stub endif +OCAMLDOCFLAGS := -I +extlib -I +bitmatch -I +libvirt -I +xml-light \ + -I +csv -I +gettext -I +gettext-stub -I ../lib +OCAMLDOCFILES := $(wildcard *.mli) $(wildcard *.ml) + #---------------------------------------------------------------------- # Build up the list of object files. -- 1.8.3.1