| 1 | ## Process this file with automake to produce Makefile.in |
|---|
| 2 | |
|---|
| 3 | # Note: we don't want dist tarballs built with docs missing, so for simplicity |
|---|
| 4 | # this Makefile.am blindly assumes the tools are in place when "make dist" is |
|---|
| 5 | # being run. For "make all", "make check", etc we carefully skip any docs |
|---|
| 6 | # which we don't have the tools to generate. |
|---|
| 7 | |
|---|
| 8 | HTMLDOCS = index.html internals.html install.html intro_ir.html overview.html \ |
|---|
| 9 | stemming.html quickstart.html remote.html remote_protocol.html \ |
|---|
| 10 | quartzdesign.html matcherdesign.html tests.html scalability.html \ |
|---|
| 11 | bm25.html code_structure.html queryparser.html \ |
|---|
| 12 | quickstartexpand.cc.html quickstartindex.cc.html quickstartsearch.cc.html |
|---|
| 13 | |
|---|
| 14 | RSTDOCS = admin_notes.rst deprecation.rst glossary.rst sorting.rst \ |
|---|
| 15 | spelling.rst synonyms.rst termgenerator.rst valueranges.rst |
|---|
| 16 | RSTHTML = $(RSTDOCS:.rst=.html) |
|---|
| 17 | |
|---|
| 18 | # Files which should be put in the distribution by automake |
|---|
| 19 | EXTRA_DIST = doxygen_api_conf.in doxygen_full_conf.in \ |
|---|
| 20 | doxygen_api_header.html_tmpl doxygen_api_footer.html_tmpl \ |
|---|
| 21 | doxygen_full_header.html_tmpl doxygen_full_footer.html_tmpl \ |
|---|
| 22 | $(RSTDOCS) \ |
|---|
| 23 | dir_contents |
|---|
| 24 | |
|---|
| 25 | # Other files which should be distributed |
|---|
| 26 | dist-hook: doxygen_api_docs |
|---|
| 27 | test -d $(distdir) || mkdir $(distdir) |
|---|
| 28 | test -d $(distdir)/apidoc || mkdir $(distdir)/apidoc |
|---|
| 29 | test -d $(distdir)/apidoc/html || mkdir $(distdir)/apidoc/html |
|---|
| 30 | test "`echo $(srcdir)/apidoc/html/*.gif`" = "$(srcdir)/apidoc/html/*.gif" || \ |
|---|
| 31 | cp -p $(srcdir)/apidoc/html/*.gif $(distdir)/apidoc/html |
|---|
| 32 | test "`echo apidoc/html/*.gif`" = "apidoc/html/*.gif" || \ |
|---|
| 33 | cp -p apidoc/html/*.gif $(distdir)/apidoc/html |
|---|
| 34 | test "`echo $(srcdir)/apidoc/html/*.png`" = "$(srcdir)/apidoc/html/*.png" || \ |
|---|
| 35 | cp -p $(srcdir)/apidoc/html/*.png $(distdir)/apidoc/html |
|---|
| 36 | test "`echo apidoc/html/*.png`" = "apidoc/html/*.png" || \ |
|---|
| 37 | cp -p apidoc/html/*.png $(distdir)/apidoc/html |
|---|
| 38 | test "`echo $(srcdir)/apidoc/html/*.css`" = "$(srcdir)/apidoc/html/*.css" || \ |
|---|
| 39 | cp -p $(srcdir)/apidoc/html/*.css $(distdir)/apidoc/html |
|---|
| 40 | test "`echo apidoc/html/*.css`" = "apidoc/html/*.css" || \ |
|---|
| 41 | cp -p apidoc/html/*.css $(distdir)/apidoc/html |
|---|
| 42 | test "`echo $(srcdir)/apidoc/html/*.html`" = "$(srcdir)/apidoc/html/*.html" || \ |
|---|
| 43 | cp -p $(srcdir)/apidoc/html/*.html $(distdir)/apidoc/html |
|---|
| 44 | test "`echo apidoc/html/*.html`" = "apidoc/html/*.html" || \ |
|---|
| 45 | cp -p apidoc/html/*.html $(distdir)/apidoc/html |
|---|
| 46 | |
|---|
| 47 | if !MAINTAINER_NO_DOCS |
|---|
| 48 | # Build API docs with doxygen |
|---|
| 49 | all-local: doxygen_api_docs |
|---|
| 50 | |
|---|
| 51 | dist_doc_DATA = $(HTMLDOCS) $(RSTHTML) apidoc.pdf |
|---|
| 52 | |
|---|
| 53 | install-data-local: doxygen_api_docs |
|---|
| 54 | $(mkinstalldirs) $(DESTDIR)$(docdir)/apidoc/html |
|---|
| 55 | $(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.gif $(DESTDIR)$(docdir)/apidoc/html |
|---|
| 56 | $(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.png $(DESTDIR)$(docdir)/apidoc/html |
|---|
| 57 | $(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.css $(DESTDIR)$(docdir)/apidoc/html |
|---|
| 58 | $(INSTALL_DATA) `test -f apidoc/html/index.html || echo $(srcdir)/`apidoc/html/*.html $(DESTDIR)$(docdir)/apidoc/html |
|---|
| 59 | endif |
|---|
| 60 | |
|---|
| 61 | ############################### |
|---|
| 62 | # How to clean up local files # |
|---|
| 63 | ############################### |
|---|
| 64 | |
|---|
| 65 | maintainer-clean-local: |
|---|
| 66 | rm -rf apidoc sourcedoc |
|---|
| 67 | |
|---|
| 68 | ################################ |
|---|
| 69 | # How to uninstall local files # |
|---|
| 70 | ################################ |
|---|
| 71 | uninstall-local: |
|---|
| 72 | rm -rf $(DESTDIR)$(docdir)/apidoc |
|---|
| 73 | |
|---|
| 74 | MAINTAINERCLEANFILES = doxygen_api_conf doxygen_full_conf \ |
|---|
| 75 | code_structure.html apidoc.pdf \ |
|---|
| 76 | $(RSTHTML) |
|---|
| 77 | |
|---|
| 78 | .PHONY: doxygen_source_docs doxygen_api_docs doxygen_docs |
|---|
| 79 | |
|---|
| 80 | doxygen_source_docs: sourcedoc/html/index.html |
|---|
| 81 | doxygen_api_docs: apidoc/html/index.html |
|---|
| 82 | doxygen_docs: doxygen_source_docs doxygen_api_docs |
|---|
| 83 | |
|---|
| 84 | if DOCUMENTATION_RULES |
|---|
| 85 | # We use $T instead of $(top_srcdir) in APIDOC_SRC, SOURCEDOC_SRC, and |
|---|
| 86 | # DIR_CONTENTS_FILES to keep their sizes down. |
|---|
| 87 | T=$(top_srcdir) |
|---|
| 88 | |
|---|
| 89 | # docsource.mk is generated by preautoreconf, run by bootstrap prior to |
|---|
| 90 | # it running autoreconf. |
|---|
| 91 | include docsource.mk |
|---|
| 92 | |
|---|
| 93 | code_structure.html: gen_codestructure_doc $(DIR_CONTENTS_FILES) |
|---|
| 94 | ./gen_codestructure_doc code_structure.html $(DIR_CONTENTS_FILES) |
|---|
| 95 | |
|---|
| 96 | apidoc.pdf apidoc/html/index.html: $(APIDOC_SRC) doxygen_api_conf \ |
|---|
| 97 | $(srcdir)/doxygen_api_header.html_tmpl \ |
|---|
| 98 | $(srcdir)/doxygen_api_footer.html_tmpl |
|---|
| 99 | rm -rf apidoc |
|---|
| 100 | top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) $(DOXYGEN) doxygen_api_conf |
|---|
| 101 | cd apidoc/latex && (pool_size=750000 $(MAKE) refman.pdf||(cat refman.log;exit 1)) |
|---|
| 102 | mv apidoc/latex/refman.pdf apidoc.pdf |
|---|
| 103 | if test "x$(PNGCRUSH)" != x ; then \ |
|---|
| 104 | for png in apidoc/html/*.png ; do \ |
|---|
| 105 | $(PNGCRUSH) -q $$png $${png}T && mv $${png}T $$png ; \ |
|---|
| 106 | done \ |
|---|
| 107 | fi |
|---|
| 108 | touch apidoc/html/index.html |
|---|
| 109 | |
|---|
| 110 | # This dependency is required so that parallel make doesn't try to run latex |
|---|
| 111 | # twice simultaneously. We touch apidoc/html/index.html after apidoc.pdf is |
|---|
| 112 | # created so that make doesn't attempt to regenerate it due to the dependency |
|---|
| 113 | # of index.html on apidoc.pdf |
|---|
| 114 | apidoc/html/index.html: apidoc.pdf |
|---|
| 115 | |
|---|
| 116 | sourcedoc/html/index.html: $(SOURCEDOC_SRC) $(APIDOC_SRC) \ |
|---|
| 117 | doxygen_full_conf \ |
|---|
| 118 | $(srcdir)/doxygen_full_header.html_tmpl \ |
|---|
| 119 | $(srcdir)/doxygen_full_footer.html_tmpl |
|---|
| 120 | top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) $(DOXYGEN) doxygen_full_conf |
|---|
| 121 | |
|---|
| 122 | .rst.html: |
|---|
| 123 | $(RST2HTML) --exit-status=warning $< $@ |
|---|
| 124 | endif |
|---|