X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FMakefile;h=5bfa6c3cfb3f5ec99ec6b7515cdc50ab59422df8;hb=778086caf71596d61b70db168e9f4b6598049cf0;hp=d7442d9d361666779b2c3daf284762468801278c;hpb=9e4692c61752313a01486594e8e1ccf573ad4a47;p=oota-llvm.git diff --git a/docs/Makefile b/docs/Makefile index d7442d9d361..5bfa6c3cfb3 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,21 +2,24 @@ # # The LLVM Compiler Infrastructure # -# This file was developed by the LLVM research group and is distributed under -# the University of Illinois Open Source License. See LICENSE.TXT for details. +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. # ##===----------------------------------------------------------------------===## LEVEL := .. -DIRS := CommandGuide +DIRS := CommandGuide tutorial ifdef BUILD_FOR_WEBSITE PROJ_OBJ_DIR = . DOXYGEN = doxygen -doxygen.cfg: doxygen.cfg.in - cat $< | sed 's/@abs_top_srcdir@/../g' | sed 's/@DOT@/dot/g' | \ - sed 's/@PACKAGE_VERSION@/CVS/g' | sed 's/@abs_top_builddir@/../g' > $@ +$(PROJ_OBJ_DIR)/doxygen.cfg: doxygen.cfg.in + cat $< | sed \ + -e 's/@abs_top_srcdir@/../g' \ + -e 's/@DOT@/dot/g' \ + -e 's/@PACKAGE_VERSION@/mainline/' \ + -e 's/@abs_top_builddir@/../g' > $@ endif include $(LEVEL)/Makefile.common @@ -28,13 +31,20 @@ DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \ doxygen.intro EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img -.PHONY: install-html install-doxygen doxygen +.PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated +install_targets := install-html ifeq ($(ENABLE_DOXYGEN),1) -install-local:: install-html install-doxygen -else -install-local:: install-html +install_targets += install-doxygen endif +ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD))) +install_targets += install-ocamldoc +endif +install-local:: $(install_targets) + +# Live documentation is generated for the web site using this target: +# 'make generated BUILD_FOR_WEBSITE=1' +generated:: doxygen ocamldoc install-html: $(PROJ_OBJ_DIR)/html.tar.gz $(Echo) Installing HTML documentation @@ -52,7 +62,6 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) $(Verb) $(GZIP) $(PROJ_OBJ_DIR)/html.tar install-doxygen: doxygen - $(Echo) Installing doxygen documentation $(Echo) Installing doxygen documentation $(Verb) $(MKDIR) $(PROJ_docsdir)/html/doxygen $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(PROJ_docsdir) @@ -60,14 +69,16 @@ install-doxygen: doxygen $(FIND) . -type f -exec \ $(DataInstall) {} $(PROJ_docsdir)/html/doxygen \; -doxygen: $(PROJ_OBJ_DIR)/doxygen.tar.gz +doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz -$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg +regendoc: $(Echo) Building doxygen documentation $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \ $(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \ fi $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg + +$(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg $(Echo) Packaging doxygen documentation $(Verb) $(RM) -rf $@ $(PROJ_OBJ_DIR)/doxygen.tar $(Verb) $(TAR) cf $(PROJ_OBJ_DIR)/doxygen.tar doxygen @@ -80,4 +91,33 @@ $(LLVM_SRC_ROOT)/docs/userloc.html: $(Echo) Making User LOC Table $(Verb) cd $(LLVM_SRC_ROOT) ; ./utils/userloc.pl -details -recurse \ -html lib include tools runtime utils examples autoconf test > docs/userloc.html - + +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 \; + +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/ + +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 '{}' ';'` + +uninstall-local:: + $(Echo) Uninstalling Documentation + $(Verb) $(RM) -rf $(PROJ_docsdir)