1 ##===- docs/Makefile ---------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
11 DIRS
:= CommandGuide tutorial
13 ifdef BUILD_FOR_WEBSITE
17 $(PROJ_OBJ_DIR
)/doxygen.cfg
: doxygen.cfg.in
19 -e
's/@abs_top_srcdir@/../g' \
21 -e
's/@PACKAGE_VERSION@/mainline/' \
22 -e
's/@abs_top_builddir@/../g' > $@
25 include $(LEVEL
)/Makefile.common
27 HTML
:= $(wildcard $(PROJ_SRC_DIR
)/*.html
) \
28 $(wildcard $(PROJ_SRC_DIR
)/*.css
)
29 IMAGES
:= $(wildcard $(PROJ_SRC_DIR
)/img
/*.
*)
30 DOXYFILES
:= doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \
32 EXTRA_DIST
:= $(HTML
) $(DOXYFILES
) llvm.css CommandGuide img
34 .PHONY
: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated
36 install_targets
:= install-html
37 ifeq ($(ENABLE_DOXYGEN
),1)
38 install_targets
+= install-doxygen
40 ifneq (,$(filter ocaml
,$(BINDINGS_TO_BUILD
)))
41 install_targets
+= install-ocamldoc
43 install-local
:: $(install_targets
)
45 # Live documentation is generated for the web site using this target:
46 # 'make generated BUILD_FOR_WEBSITE=1'
47 generated
:: doxygen ocamldoc
49 install-html
: $(PROJ_OBJ_DIR
)/html.
tar.gz
50 $(Echo
) Installing HTML documentation
51 $(Verb
) $(MKDIR
) $(DESTDIR
)$(PROJ_docsdir
)/html
52 $(Verb
) $(MKDIR
) $(DESTDIR
)$(PROJ_docsdir
)/html
/img
53 $(Verb
) $(DataInstall
) $(HTML
) $(DESTDIR
)$(PROJ_docsdir
)/html
54 $(Verb
) $(DataInstall
) $(IMAGES
) $(DESTDIR
)$(PROJ_docsdir
)/html
/img
55 $(Verb
) $(DataInstall
) $(PROJ_OBJ_DIR
)/html.
tar.gz
$(DESTDIR
)$(PROJ_docsdir
)
57 $(PROJ_OBJ_DIR
)/html.
tar.gz
: $(HTML
)
58 $(Echo
) Packaging HTML documentation
59 $(Verb
) $(RM
) -rf
$@
$(PROJ_OBJ_DIR
)/html.
tar
60 $(Verb
) cd
$(PROJ_SRC_DIR
) && \
61 $(TAR
) cf
$(PROJ_OBJ_DIR
)/html.
tar *.html
62 $(Verb
) $(GZIP
) $(PROJ_OBJ_DIR
)/html.
tar
64 install-doxygen
: doxygen
65 $(Echo
) Installing doxygen documentation
66 $(Verb
) $(MKDIR
) $(DESTDIR
)$(PROJ_docsdir
)/html
/doxygen
67 $(Verb
) $(DataInstall
) $(PROJ_OBJ_DIR
)/doxygen.
tar.gz
$(DESTDIR
)$(PROJ_docsdir
)
68 $(Verb
) cd
$(PROJ_OBJ_DIR
)/doxygen
&& \
69 $(FIND
) .
-type f
-exec \
70 $(DataInstall
) {} $(DESTDIR
)$(PROJ_docsdir
)/html
/doxygen \
;
72 doxygen
: regendoc
$(PROJ_OBJ_DIR
)/doxygen.
tar.gz
75 $(Echo
) Building doxygen documentation
76 $(Verb
) if
test -e
$(PROJ_OBJ_DIR
)/doxygen
; then \
77 $(RM
) -rf
$(PROJ_OBJ_DIR
)/doxygen
; \
79 $(Verb
) $(DOXYGEN
) $(PROJ_OBJ_DIR
)/doxygen.cfg
81 $(PROJ_OBJ_DIR
)/doxygen.
tar.gz
: $(DOXYFILES
) $(PROJ_OBJ_DIR
)/doxygen.cfg
82 $(Echo
) Packaging doxygen documentation
83 $(Verb
) $(RM
) -rf
$@
$(PROJ_OBJ_DIR
)/doxygen.
tar
84 $(Verb
) $(TAR
) cf
$(PROJ_OBJ_DIR
)/doxygen.
tar doxygen
85 $(Verb
) $(GZIP
) $(PROJ_OBJ_DIR
)/doxygen.
tar
86 $(Verb
) $(CP
) $(PROJ_OBJ_DIR
)/doxygen.
tar.gz
$(PROJ_OBJ_DIR
)/doxygen
/html
/
88 userloc
: $(LLVM_SRC_ROOT
)/docs
/userloc.html
90 $(LLVM_SRC_ROOT
)/docs
/userloc.html
:
91 $(Echo
) Making User LOC Table
92 $(Verb
) cd
$(LLVM_SRC_ROOT
) ; .
/utils
/userloc.pl
-details
-recurse \
93 -html lib
include tools runtime utils examples autoconf
test > docs
/userloc.html
95 install-ocamldoc
: ocamldoc
96 $(Echo
) Installing ocamldoc documentation
97 $(Verb
) $(MKDIR
) $(DESTDIR
)$(PROJ_docsdir
)/ocamldoc
/html
98 $(Verb
) $(DataInstall
) $(PROJ_OBJ_DIR
)/ocamldoc.
tar.gz
$(DESTDIR
)$(PROJ_docsdir
)
99 $(Verb
) cd
$(PROJ_OBJ_DIR
)/ocamldoc
&& \
100 $(FIND
) .
-type f
-exec \
101 $(DataInstall
) {} $(DESTDIR
)$(PROJ_docsdir
)/ocamldoc
/html \
;
103 ocamldoc
: regen-ocamldoc
104 $(Echo
) Packaging ocamldoc documentation
105 $(Verb
) $(RM
) -rf
$(PROJ_OBJ_DIR
)/ocamldoc.
tar*
106 $(Verb
) $(TAR
) cf
$(PROJ_OBJ_DIR
)/ocamldoc.
tar ocamldoc
107 $(Verb
) $(GZIP
) $(PROJ_OBJ_DIR
)/ocamldoc.
tar
108 $(Verb
) $(CP
) $(PROJ_OBJ_DIR
)/ocamldoc.
tar.gz
$(PROJ_OBJ_DIR
)/ocamldoc
/html
/
111 $(Echo
) Building ocamldoc documentation
112 $(Verb
) if
test -e
$(PROJ_OBJ_DIR
)/ocamldoc
; then \
113 $(RM
) -rf
$(PROJ_OBJ_DIR
)/ocamldoc
; \
115 $(Verb
) $(MAKE
) -C
$(LEVEL
)/bindings
/ocaml ocamldoc
116 $(Verb
) $(MKDIR
) $(PROJ_OBJ_DIR
)/ocamldoc
/html
118 $(OCAMLDOC
) -d
$(PROJ_OBJ_DIR
)/ocamldoc
/html
-sort -colorize-code
-html \
119 `$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" -exec echo -load '{}' ';'`
122 $(Echo
) Uninstalling Documentation
123 $(Verb
) $(RM
) -rf
$(DESTDIR
)$(PROJ_docsdir
)