github.com/rvaralda/deis@v1.4.1/docs/Makefile (about)

     1  # Makefile for Sphinx documentation
     2  #
     3  
     4  # You can set these variables from the command line.
     5  SPHINXOPTS    = -W
     6  SPHINXBUILD   = sphinx-build
     7  PAPER         =
     8  BUILDDIR      = _build
     9  
    10  READTHEDOCS   = true
    11  export READTHEDOCS
    12  
    13  # # User-friendly check for sphinx-build
    14  # ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
    15  # $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
    16  # endif
    17  
    18  # Internal variables.
    19  PAPEROPT_a4     = -D latex_paper_size=a4
    20  PAPEROPT_letter = -D latex_paper_size=letter
    21  ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
    22  # the i18n builder cannot share the environment and doctrees with the others
    23  I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
    24  
    25  .PHONY: help clean test html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
    26  
    27  help:
    28  	@echo "Please use \`make <target>' where <target> is one of"
    29  	@echo "  html       to make standalone HTML files"
    30  	@echo "  dirhtml    to make HTML files named index.html in directories"
    31  	@echo "  server     to make HTML as above and serve it at http://localhost:8000/"
    32  	@echo "  test       to validate the dirhtml output"
    33  	@echo "  singlehtml to make a single large HTML file"
    34  	@echo "  pickle     to make pickle files"
    35  	@echo "  json       to make JSON files"
    36  	@echo "  htmlhelp   to make HTML files and a HTML help project"
    37  	@echo "  qthelp     to make HTML files and a qthelp project"
    38  	@echo "  devhelp    to make HTML files and a Devhelp project"
    39  	@echo "  epub       to make an epub"
    40  	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
    41  	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
    42  	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
    43  	@echo "  text       to make text files"
    44  	@echo "  man        to make manual pages"
    45  	@echo "  texinfo    to make Texinfo files"
    46  	@echo "  info       to make Texinfo files and run them through makeinfo"
    47  	@echo "  gettext    to make PO message catalogs"
    48  	@echo "  changes    to make an overview of all changed/added/deprecated items"
    49  	@echo "  xml        to make Docutils-native XML files"
    50  	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
    51  	@echo "  linkcheck  to check all external links for integrity"
    52  	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
    53  
    54  clean:
    55  	rm -rf $(BUILDDIR)/*
    56  
    57  html:
    58  	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
    59  	@echo
    60  	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
    61  
    62  dirhtml:
    63  	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
    64  	@echo
    65  	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
    66  
    67  server: dirhtml
    68  	@cd $(BUILDDIR)/dirhtml; python -m SimpleHTTPServer 8000
    69  
    70  test: clean
    71  	@if [ ! -d venv ]; then virtualenv venv; fi
    72  	venv/bin/pip install -q -r docs_requirements.txt
    73  	venv/bin/$(SPHINXBUILD) -b dirhtml -N $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
    74  	grep -q \<h1\>Welcome _build/dirhtml/index.html || exit 1
    75  	@echo
    76  	@echo "Test finished. The HTML pages are in $(BUILDDIR)/dirhtml."
    77  
    78  zipfile: dirhtml
    79  	cd $(BUILDDIR)/dirhtml; zip -r -D -o ../../docs.zip .
    80  
    81  singlehtml:
    82  	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
    83  	@echo
    84  	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
    85  
    86  pickle:
    87  	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
    88  	@echo
    89  	@echo "Build finished; now you can process the pickle files."
    90  
    91  json:
    92  	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
    93  	@echo
    94  	@echo "Build finished; now you can process the JSON files."
    95  
    96  htmlhelp:
    97  	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
    98  	@echo
    99  	@echo "Build finished; now you can run HTML Help Workshop with the" \
   100  	      ".hhp project file in $(BUILDDIR)/htmlhelp."
   101  
   102  qthelp:
   103  	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
   104  	@echo
   105  	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
   106  	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
   107  	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/deis.qhcp"
   108  	@echo "To view the help file:"
   109  	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/deis.qhc"
   110  
   111  devhelp:
   112  	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
   113  	@echo
   114  	@echo "Build finished."
   115  	@echo "To view the help file:"
   116  	@echo "# mkdir -p $$HOME/.local/share/devhelp/deis"
   117  	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/deis"
   118  	@echo "# devhelp"
   119  
   120  epub:
   121  	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
   122  	@echo
   123  	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
   124  
   125  latex:
   126  	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
   127  	@echo
   128  	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
   129  	@echo "Run \`make' in that directory to run these through (pdf)latex" \
   130  	      "(use \`make latexpdf' here to do that automatically)."
   131  
   132  latexpdf:
   133  	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
   134  	@echo "Running LaTeX files through pdflatex..."
   135  	$(MAKE) -C $(BUILDDIR)/latex all-pdf
   136  	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
   137  
   138  latexpdfja:
   139  	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
   140  	@echo "Running LaTeX files through platex and dvipdfmx..."
   141  	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
   142  	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
   143  
   144  text:
   145  	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
   146  	@echo
   147  	@echo "Build finished. The text files are in $(BUILDDIR)/text."
   148  
   149  man:
   150  	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
   151  	@echo
   152  	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
   153  
   154  texinfo:
   155  	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
   156  	@echo
   157  	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
   158  	@echo "Run \`make' in that directory to run these through makeinfo" \
   159  	      "(use \`make info' here to do that automatically)."
   160  
   161  info:
   162  	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
   163  	@echo "Running Texinfo files through makeinfo..."
   164  	make -C $(BUILDDIR)/texinfo info
   165  	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
   166  
   167  gettext:
   168  	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
   169  	@echo
   170  	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
   171  
   172  changes:
   173  	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
   174  	@echo
   175  	@echo "The overview file is in $(BUILDDIR)/changes."
   176  
   177  linkcheck:
   178  	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
   179  	@echo
   180  	@echo "Link check complete; look for any errors in the above output " \
   181  	      "or in $(BUILDDIR)/linkcheck/output.txt."
   182  
   183  doctest:
   184  	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
   185  	@echo "Testing of doctests in the sources finished, look at the " \
   186  	      "results in $(BUILDDIR)/doctest/output.txt."
   187  
   188  xml:
   189  	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
   190  	@echo
   191  	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
   192  
   193  pseudoxml:
   194  	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
   195  	@echo
   196  	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."