X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FMakefile;h=c9d2477c0af29f3d516a51bd267ca56786a91211;hb=05ef67b6b9f1efe216cb4c1bbe0e75b178b5fba2;hp=7fe849d3e2dfb75e0854e90590b84543b45778a5;hpb=031d30781acaecb58f64a7b480818a219594e99f;p=oota-llvm.git diff --git a/docs/Makefile b/docs/Makefile index 7fe849d3e2d..c9d2477c0af 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,14 +1,14 @@ ##===- docs/Makefile ---------------------------------------*- Makefile -*-===## -# +# # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. -# +# ##===----------------------------------------------------------------------===## LEVEL := .. -DIRS := CommandGuide tutorial +DIRS := ifdef BUILD_FOR_WEBSITE PROJ_OBJ_DIR = . @@ -16,20 +16,29 @@ DOXYGEN = doxygen $(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' > $@ + -e 's/@abs_top_builddir@/../g' \ + -e 's/@abs_top_srcdir@/../g' \ + -e 's/@enable_external_search@/NO/g' \ + -e 's/@enable_searchengine@/NO/g' \ + -e 's/@enable_server_based_search@/NO/g' \ + -e 's/@extra_search_mappings@//g' \ + -e 's/@llvm_doxygen_generate_qhp@//g' \ + -e 's/@llvm_doxygen_qch_filename@//g' \ + -e 's/@llvm_doxygen_qhelpgenerator_path@//g' \ + -e 's/@llvm_doxygen_qhp_cust_filter_attrs@//g' \ + -e 's/@llvm_doxygen_qhp_cust_filter_name@//g' \ + -e 's/@llvm_doxygen_qhp_namespace@//g' \ + -e 's/@searchengine_url@//g' \ + > $@ endif include $(LEVEL)/Makefile.common HTML := $(wildcard $(PROJ_SRC_DIR)/*.html) \ $(wildcard $(PROJ_SRC_DIR)/*.css) -IMAGES := $(wildcard $(PROJ_SRC_DIR)/img/*.*) -DOXYFILES := doxygen.cfg.in doxygen.css doxygen.footer doxygen.header \ - doxygen.intro -EXTRA_DIST := $(HTML) $(DOXYFILES) llvm.css CommandGuide img +DOXYFILES := doxygen.cfg.in doxygen.intro .PHONY: install-html install-doxygen doxygen install-ocamldoc ocamldoc generated @@ -37,21 +46,26 @@ install_targets := install-html ifeq ($(ENABLE_DOXYGEN),1) install_targets += install-doxygen endif +ifdef OCAMLFIND ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD))) install_targets += install-ocamldoc endif +endif install-local:: $(install_targets) +generated_targets := doxygen +ifdef OCAMLFIND +generated_targets += ocamldoc +endif + # Live documentation is generated for the web site using this target: # 'make generated BUILD_FOR_WEBSITE=1' -generated:: doxygen ocamldoc +generated:: $(generated_targets) install-html: $(PROJ_OBJ_DIR)/html.tar.gz $(Echo) Installing HTML documentation $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/img $(Verb) $(DataInstall) $(HTML) $(DESTDIR)$(PROJ_docsdir)/html - $(Verb) $(DataInstall) $(IMAGES) $(DESTDIR)$(PROJ_docsdir)/html/img $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/html.tar.gz $(DESTDIR)$(PROJ_docsdir) $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) @@ -63,19 +77,20 @@ $(PROJ_OBJ_DIR)/html.tar.gz: $(HTML) install-doxygen: doxygen $(Echo) Installing doxygen documentation - $(Verb) $(MKDIR) $(DESTDIR)$(PROJ_docsdir)/html/doxygen $(Verb) $(DataInstall) $(PROJ_OBJ_DIR)/doxygen.tar.gz $(DESTDIR)$(PROJ_docsdir) - $(Verb) cd $(PROJ_OBJ_DIR)/doxygen && \ - $(FIND) . -type f -exec \ - $(DataInstall) {} $(DESTDIR)$(PROJ_docsdir)/html/doxygen \; + $(Verb) cd $(PROJ_OBJ_DIR)/doxygen/html && \ + for DIR in $$($(FIND) . -type d); do \ + DESTSUB="$(DESTDIR)$(PROJ_docsdir)/html/doxygen/$$(echo $$DIR | cut -c 3-)"; \ + $(MKDIR) $$DESTSUB && \ + $(FIND) $$DIR -maxdepth 1 -type f -exec $(DataInstall) {} $$DESTSUB \; ; \ + if [ $$? != 0 ]; then exit 1; fi \ + done doxygen: regendoc $(PROJ_OBJ_DIR)/doxygen.tar.gz regendoc: $(Echo) Building doxygen documentation - $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \ - $(RM) -rf $(PROJ_OBJ_DIR)/doxygen ; \ - fi + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/doxygen $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg $(PROJ_OBJ_DIR)/doxygen.tar.gz: $(DOXYFILES) $(PROJ_OBJ_DIR)/doxygen.cfg @@ -109,14 +124,13 @@ ocamldoc: regen-ocamldoc regen-ocamldoc: $(Echo) Building ocamldoc documentation - $(Verb) if test -e $(PROJ_OBJ_DIR)/ocamldoc ; then \ - $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc ; \ - fi + $(Verb) $(RM) -rf $(PROJ_OBJ_DIR)/ocamldoc $(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 '{}' ';'` + $(OCAMLFIND) ocamldoc -d $(PROJ_OBJ_DIR)/ocamldoc/html -sort -colorize-code -html \ + `$(FIND) $(LEVEL)/bindings/ocaml -name "*.odoc" \ + -path "*/$(BuildMode)/*.odoc" -exec echo -load '{}' ';'` uninstall-local:: $(Echo) Uninstalling Documentation