OCAMLC = @OCAMLC@
OCAMLOPT = @OCAMLOPT@
+OCAMLDOC = @OCAMLDOC@
+OCAMLDOCFLAGS += -html -sort
+
# Common rules for building OCaml objects.
ifneq ($(OCAMLFIND),)
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
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; \
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:
OCAMLDEPFLAGS := $(SYNTAX)
+OCAMLDOCFLAGS := $(SYNTAX) -I +extlib -I +bitmatch -I ../lib
+OCAMLDOCFILES := diskzip.ml
+
BYTE_TARGETS := diskzip
OPT_TARGETS := diskzip.opt
OCAMLDEPFLAGS := $(SYNTAX)
+OCAMLDOCFLAGS += $(SYNTAX) -I +extlib -I +bitmatch
+OCAMLDOCFILES := int63.mli diskimage.mli diskimage.ml
+
BYTE_TARGETS := diskimage.cma
OPT_TARGETS := diskimage.cmxa
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.