Merge branch Generic Foreign Key changes
[mediagoblin.git] / docs / Makefile
index 4461893fa0559e4f97493df335cec4d22447dde4..e9ee5af0f128b6f2c9d9078e906ed2bfada1cb4a 100644 (file)
@@ -2,7 +2,8 @@
 #
 
 # You can set these variables from the command line.
-SPHINXOPTS    = -W
+PYTHON        ?= python
+SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
 PAPER         =
 BUILDDIR      = build
@@ -14,11 +15,12 @@ ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
 # the i18n builder cannot share the environment and doctrees with the others
 I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+.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"
@@ -46,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