1 ##===- docs/Makefile ---------------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file was developed by the LLVM research group and is distributed under
6 # the University of Illinois Open Source License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
13 ifdef BUILD_FOR_WEBSITE
17 doxygen.cfg: doxygen.cfg.in
18 cat $< | sed 's/@abs_top_srcdir@/../g' | sed 's/@DOT@/dot/g' | \
19 sed 's/@PACKAGE_VERSION@/CVS/g' | sed 's/@abs_top_builddir@/../g' > $@
22 include $(LEVEL)/Makefile.common
24 HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \
25 $(wildcard $(PROJ_SRC_DIR)/*.css)
26 IMAGES := $(wildcard $(PROJ_SRC_DIR)/img/*.*)
27 DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \
29 EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img
31 .PHONY: install-html install-doxygen doxygen
33 ifeq ($(ENABLE_DOXYGEN),1)
34 install-local:: install-html install-doxygen
36 install-local:: install-html
39 install-html: $(PROJ_OBJ_DIR)/html.tar.gz
40 $(Echo) Installing HTML documentation
41 $(Verb) $(MKDIR) $(PROJ_docsdir)/html
42 $(Verb) $(MKDIR) $(PROJ_docsdir)/html/img
43 $(Verb) $(DataInstall) $(HTML) $(PROJ_docsdir)/html
44 $(Verb) $(DataInstall) $(IMAGES) $(PROJ_docsdir)/html/img
45 $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(PROJ_docsdir)
47 $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
48 $(Echo) Packaging HTML documentation
49 $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar
50 $(Verb) cd $(PROJ_SRC_DIR) && \
51 $(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html
52 $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar
54 install-doxygen: doxygen
55 $(Echo) Installing doxygen documentation
56 $(Echo) Installing doxygen documentation
57 $(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen
58 $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir)
59 $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
60 $(FIND) . -type f -exec \
61 $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \;
63 doxygen: $(PROJ_OBJ_DIR)/doxygen.tar.gz
65 $(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg
66 $(Echo) Building doxygen documentation
67 $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \
68 $(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \
70 $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg
71 $(Echo) Packaging doxygen documentation
72 $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar
73 $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen
74 $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/doxygen.tar
75 $(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/
77 userloc: $(LLVM_SRC_ROOT)/docs/userloc.html
79 $(LLVM_SRC_ROOT)/docs/userloc.html:
80 $(Echo) Making User LOC Table
81 $(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \
82 -html lib include tools runtime utils examples autoconf test > docs/userloc.html