all: http.cma
opt: http.cmxa
world: all opt
+doc: *.mli
+ $(OCAMLDOC) -html -d doc/html *.mli
examples:
$(MAKE) -C examples/
clean:
$(MAKE) -C examples/ clean
- -rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt}
-distclean: clean
+ rm -f *.cm[ioax] *.cmxa *.[ao] test{,.opt}
+docclean:
+ rm -f doc/html/*.html doc/html/*.css
+distclean: clean docclean
$(MAKE) -C examples/ distclean
-rm -f META
dist: distclean depend
.PHONY: \
all opt world examples examples.opt depend clean distclean dist \
- install meta
+ install meta doc
DISTVERSION = 0.0.5
DEBUG_OPTS =
-COMMON_OPTS = $(DEBUG_OPTS) -pp camlp4o -package "unix,pcre,netstring,threads"
+REQUIRES = unix pcre netstring threads
+COMMON_OPTS = $(DEBUG_OPTS) -pp camlp4o -package "$(REQUIRES)"
OCAMLFIND = ocamlfind
OCAMLC = $(OCAMLFIND) ocamlc $(COMMON_OPTS) -thread
OCAMLOPT = $(OCAMLFIND) ocamlopt $(COMMON_OPTS) -thread
OCAMLDEP = $(OCAMLFIND) ocamldep $(COMMON_OPTS)
+OCAMLDOC = ocamldoc
DISTNAME = ocaml-http
DISTDIR = $(DISTNAME)-$(DISTVERSION)
-EXTRA_DIST = INSTALL LICENSE README META.in Makefile Makefile.defs .depend tophttp
+EXTRA_DIST = \
+ INSTALL LICENSE README META.in Makefile Makefile.defs .depend tophttp doc