Merge branch Generic Foreign Key changes
[mediagoblin.git] / docs / Makefile
index 9a4608de548a39189e7a91d86d71610faf5e718d..e9ee5af0f128b6f2c9d9078e906ed2bfada1cb4a 100644 (file)
@@ -2,24 +2,25 @@
 #
 
 # You can set these variables from the command line.
+PYTHON        ?= python
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
 PAPER         =
-BUILDDIR      = _build
+BUILDDIR      = build
 
 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
 # the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.PHONY: help clean html htmlview dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
 
 help:
        @echo "Please use \`make <target>' where <target> is one of"
        @echo "  html       to make standalone HTML files"
+       @echo "  htmlview   to open the index page built by the html target in your browser"
        @echo "  dirhtml    to make HTML files named index.html in directories"
        @echo "  singlehtml to make a single large HTML file"
        @echo "  pickle     to make pickle files"
@@ -35,6 +36,9 @@ help:
        @echo "  changes    to make an overview of all changed/added/deprecated items"
        @echo "  linkcheck  to check all external links for integrity"
        @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+       @echo "  texinfo    to make Texinfo files"
+       @echo "  info       to make Texinfo files and run them through makeinfo"
+       @echo "  gettext    to make PO message catalogs"
 
 clean:
        -rm -rf $(BUILDDIR)/*
@@ -44,6 +48,9 @@ html:
        @echo
        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
 
+htmlview: html
+       $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
+
 dirhtml:
        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
        @echo