permit multiline comments and strings in macros
[bpt/coccinelle.git] / ocaml / Makefile.doc
CommitLineData
feec80c3
C
1ifneq ($(MAKECMDGOALS),distclean)
2include ../Makefile.config
3endif
4
993936c0
C
5DEST=../docs
6FLAGS=$(INCLUDES) -hide Pervasives
7HTMLFLAGS=-all-params -colorize-code
f3c4ece6 8MANFLAGS=-man-mini
993936c0 9
feec80c3 10.PHONY: doc
f3c4ece6
C
11
12doc: html man
993936c0 13
feec80c3 14html: $(DEST)/html/index.html
abad11c5
C
15man: $(DEST)/man/Coccilib.3o
16
17ifneq ($(FEATURE_OCAMLBUILD),yes)
18$(DEST)/man/Coccilib.3o: coccilib.cmi ../parsing_c/ast_c.cmi
19 $(MKDIR_P) $(DEST)/man
20 $(OCAMLDOC) $(FLAGS) -hide Exposed_modules \
21 -man $(MANFLAGS) -d $(DEST)/man ../parsing_c/ast_c.ml coccilib.ml
22
23$(DEST)/html/index.html: coccilib.cmi ../parsing_c/ast_c.cmi
feec80c3 24 $(MKDIR_P) $(DEST)/html
abad11c5
C
25 $(OCAMLDOC) $(FLAGS) -hide Exposed_modules \
26 -html $(HTMLFLAGS) -d $(DEST)/html ../parsing_c/ast_c.ml coccilib.ml
27else
993936c0 28
abad11c5 29$(DEST)/man/Coccilib.3o: ../_build/ocaml/coccilib.cmi coccilib.ml exposed_modules.ml man.odocl
feec80c3 30 $(MKDIR_P) $(DEST)/man
abad11c5
C
31 cd .. && $(OCAMLBUILD) ocaml/man.docdir/index.html
32 cp -r ../_build/ocaml/man.docdir/* $(DEST)/man/
33
34$(DEST)/html/index.html: ../_build/ocaml/coccilib.cmi coccilib.ml exposed_modules.ml html.odocl
35 $(MKDIR_P) $(DEST)/html
36 cd .. && $(OCAMLBUILD) ocaml/html.docdir/index.html
37 cp -r ../_build/ocaml/html.docdir/* $(DEST)/html/
38
39# build coccilib.cmi if needed
40../_build/ocaml/coccilib.cmi:
41 cd .. && $(OCAMLBUILD) ocaml/coccilib.cmi
42
43endif
993936c0
C
44
45cleandoc:
abad11c5
C
46 @if test -z "${KEEP_GENERATED}"; then \
47 rm -rf $(DEST)/html $(DEST)/man; fi