2003-10-21 16:33:46 +02:00
|
|
|
##===- docs/Makefile ---------------------------------------*- Makefile -*-===##
|
|
|
|
#
|
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-29 21:11:13 +01:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2003-10-21 16:33:46 +02:00
|
|
|
#
|
|
|
|
##===----------------------------------------------------------------------===##
|
2002-01-30 22:20:23 +01:00
|
|
|
|
2004-11-29 05:47:35 +01:00
|
|
|
LEVEL := ..
|
2008-03-30 22:32:18 +02:00
|
|
|
DIRS := CommandGuide tutorial
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2006-07-06 02:36:52 +02:00
|
|
|
ifdef BUILD_FOR_WEBSITE
|
|
|
|
PROJ_OBJ_DIR = .
|
|
|
|
DOXYGEN = doxygen
|
|
|
|
|
2007-03-28 01:19:39 +02:00
|
|
|
$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in
|
2007-03-04 01:45:50 +01:00
|
|
|
cat $< | sed \
|
|
|
|
-e 's/@abs_top_srcdir@/../g' \
|
|
|
|
-e 's/@DOT@/dot/g' \
|
2008-01-28 00:43:26 +01:00
|
|
|
-e 's/@PACKAGE_VERSION@/mainline/' \
|
2007-03-04 01:45:50 +01:00
|
|
|
-e 's/@abs_top_builddir@/../g' > $@
|
2006-07-06 02:36:52 +02:00
|
|
|
endif
|
|
|
|
|
2004-11-29 05:47:35 +01:00
|
|
|
include $(LEVEL)/Makefile.common
|
|
|
|
|
2005-01-16 03:21:29 +01:00
|
|
|
HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \
|
|
|
|
$(wildcard $(PROJ_SRC_DIR)/*.css)
|
|
|
|
IMAGES := $(wildcard $(PROJ_SRC_DIR)/img/*.*)
|
2005-01-11 07:26:27 +01:00
|
|
|
DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \
|
|
|
|
doxygen.intro
|
2004-11-29 05:47:35 +01:00
|
|
|
EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img
|
|
|
|
|
2008-03-31 19:27:57 +02:00
|
|
|
.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2008-03-10 16:49:16 +01:00
|
|
|
install_targets := install-html
|
2004-11-29 05:47:35 +01:00
|
|
|
ifeq ($(ENABLE_DOXYGEN),1)
|
2008-03-10 16:49:16 +01:00
|
|
|
install_targets += install-doxygen
|
2004-11-29 05:47:35 +01:00
|
|
|
endif
|
2008-03-10 16:49:16 +01:00
|
|
|
ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD)))
|
|
|
|
install_targets += install-ocamldoc
|
|
|
|
endif
|
|
|
|
install-local:: $(install_targets)
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2008-03-31 19:27:57 +02:00
|
|
|
# Live documentation is generated for the web site using this target:
|
|
|
|
# 'make generated BUILD_FOR_WEBSITE=1'
|
|
|
|
generated:: doxygen ocamldoc
|
|
|
|
|
2005-01-16 03:21:29 +01:00
|
|
|
install-html: $(PROJ_OBJ_DIR)/html.tar.gz
|
2004-11-29 05:47:35 +01:00
|
|
|
$(Echo) Installing HTML documentation
|
2005-02-24 22:28:08 +01:00
|
|
|
$(Verb) $(MKDIR) $(PROJ_docsdir)/html
|
|
|
|
$(Verb) $(MKDIR) $(PROJ_docsdir)/html/img
|
|
|
|
$(Verb) $(DataInstall) $(HTML) $(PROJ_docsdir)/html
|
|
|
|
$(Verb) $(DataInstall) $(IMAGES) $(PROJ_docsdir)/html/img
|
|
|
|
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(PROJ_docsdir)
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2005-01-16 03:21:29 +01:00
|
|
|
$(PROJ_OBJ_DIR)/html.tar.gz: $(HTML)
|
2004-11-29 05:47:35 +01:00
|
|
|
$(Echo) Packaging HTML documentation
|
2005-01-16 03:21:29 +01:00
|
|
|
$(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/html.tar
|
|
|
|
$(Verb) cd $(PROJ_SRC_DIR) && \
|
|
|
|
$(TAR) cf $(PROJ_OBJ_DIR)/html.tar *.html
|
|
|
|
$(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar
|
2004-11-29 05:47:35 +01:00
|
|
|
|
|
|
|
install-doxygen: doxygen
|
|
|
|
$(Echo) Installing doxygen documentation
|
2005-02-24 22:28:08 +01:00
|
|
|
$(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen
|
|
|
|
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir)
|
2005-01-16 03:21:29 +01:00
|
|
|
$(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \
|
2004-11-29 05:47:35 +01:00
|
|
|
$(FIND) . -type f -exec \
|
2005-02-24 22:28:08 +01:00
|
|
|
$(DataInstall) {} $(PROJ_docsdir)/html/doxygen \;
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2007-03-27 08:06:15 +02:00
|
|
|
doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2007-03-27 08:06:15 +02:00
|
|
|
regendoc:
|
2004-11-29 05:47:35 +01:00
|
|
|
$(Echo) Building doxygen documentation
|
2005-01-16 03:21:29 +01:00
|
|
|
$(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \
|
|
|
|
$(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \
|
2005-01-11 07:26:27 +01:00
|
|
|
fi
|
2005-01-16 03:21:29 +01:00
|
|
|
$(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg
|
2007-03-27 08:06:15 +02:00
|
|
|
|
|
|
|
$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg
|
2004-11-29 05:47:35 +01:00
|
|
|
$(Echo) Packaging doxygen documentation
|
2005-01-16 03:21:29 +01:00
|
|
|
$(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar
|
|
|
|
$(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen
|
|
|
|
$(Verb) $(GZIP) $(PROJ_OBJ_DIR)/doxygen.tar
|
2005-11-30 07:31:28 +01:00
|
|
|
$(Verb) $(CP) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_OBJ_DIR)/doxygen/html/
|
2004-11-29 05:47:35 +01:00
|
|
|
|
2005-05-16 20:29:13 +02:00
|
|
|
userloc: $(LLVM_SRC_ROOT)/docs/userloc.html
|
|
|
|
|
|
|
|
$(LLVM_SRC_ROOT)/docs/userloc.html:
|
2005-05-16 20:12:58 +02:00
|
|
|
$(Echo) Making User LOC Table
|
|
|
|
$(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \
|
2005-05-16 20:29:13 +02:00
|
|
|
-html lib include tools runtime utils examples autoconf test > docs/userloc.html
|
2008-03-10 16:49:16 +01:00
|
|
|
|
|
|
|
install-ocamldoc: ocamldoc
|
|
|
|
$(Echo) Installing ocamldoc documentation
|
|
|
|
$(Verb) $(MKDIR) $(PROJ_docsdir)/ocamldoc/html
|
|
|
|
$(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_docsdir)
|
|
|
|
$(Verb) cd $(PROJ_OBJ_DIR)/ocamldoc && \
|
|
|
|
$(FIND) . -type f -exec \
|
|
|
|
$(DataInstall) {} $(PROJ_docsdir)/ocamldoc/html \;
|
|
|
|
|
2009-12-14 23:44:22 +01:00
|
|
|
ocamldoc: regen-ocamldoc
|
|
|
|
$(Echo) Packaging ocamldoc documentation
|
|
|
|
$(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc.tar*
|
|
|
|
$(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/ocamldoc.tar ocamldoc
|
|
|
|
$(Verb) $(GZIP) $(PROJ_OBJ_DIR)/ocamldoc.tar
|
|
|
|
$(Verb) $(CP) $(PROJ_OBJ_DIR)/ocamldoc.tar.gz $(PROJ_OBJ_DIR)/ocamldoc/html/
|
2008-03-10 16:49:16 +01:00
|
|
|
|
|
|
|
regen-ocamldoc:
|
|
|
|
$(Echo) Building ocamldoc documentation
|
|
|
|
$(Verb) if test -e $(PROJ_OBJ_DIR)/ocamldoc ; then \
|
|
|
|
$(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc ; \
|
|
|
|
fi
|
|
|
|
$(Verb) $(MAKE) -C $(LEVEL)/bindings/ocaml ocamldoc
|
|
|
|
$(Verb) $(MKDIR) $(PROJ_OBJ_DIR)/ocamldoc/html
|
|
|
|
$(Verb) \
|
|
|
|
$(OCAMLDOC) -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \
|
|
|
|
`$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" -exec echo -load '{}' ';'`
|
|
|
|
|
2008-03-30 22:32:18 +02:00
|
|
|
uninstall-local::
|
|
|
|
$(Echo) Uninstalling Documentation
|
|
|
|
$(Verb) $(RM) -rf $(PROJ_docsdir)
|