Selaa lähdekoodia

[Docs] Fix Sphinx incremental build. Patch by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163235 91177308-0d34-0410-b5e6-96231b3b80d8
Michael J. Spencer 13 vuotta sitten
vanhempi
commit
aadf715702

+ 4 - 0
docs/Makefile.sphinx

@@ -46,6 +46,10 @@ clean:
 html:
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 	@echo
+	@# FIXME: Remove this `cp` once HTML->Sphinx transition is completed.
+	@# Kind of a hack, but HTML-formatted docs are on the way out anyway.
+	@echo "Copying legacy HTML-formatted docs into $(BUILDDIR)/html"
+	@cp -a *.html tutorial $(BUILDDIR)/html
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
 
 dirhtml:

+ 0 - 0
docs/llvm-theme/layout.html → docs/_themes/llvm-theme/layout.html


+ 0 - 0
docs/llvm-theme/static/contents.png → docs/_themes/llvm-theme/static/contents.png


+ 0 - 0
docs/llvm-theme/static/llvm-theme.css → docs/_themes/llvm-theme/static/llvm-theme.css


+ 0 - 0
docs/llvm-theme/static/logo.png → docs/_themes/llvm-theme/static/logo.png


+ 0 - 0
docs/llvm-theme/static/navigation.png → docs/_themes/llvm-theme/static/navigation.png


+ 0 - 0
docs/llvm-theme/theme.conf → docs/_themes/llvm-theme/theme.conf


+ 3 - 13
docs/conf.py

@@ -98,7 +98,7 @@ html_theme = 'llvm-theme'
 #html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-html_theme_path = ["."]
+html_theme_path = ["_themes"]
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
@@ -134,18 +134,7 @@ html_sidebars = {'index': 'indexsidebar.html'}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-#
-# We load all the old-school HTML documentation pages into Sphinx here.
-basedir = os.path.dirname(__file__)
-html_additional_pages = {}
-for directory in ('', 'tutorial'):
-    for file in os.listdir(os.path.join(basedir, directory)):
-        if not file.endswith('.html'):
-            continue
-
-        subpath = os.path.join(directory, file)
-        name,_ = os.path.splitext(subpath)
-        html_additional_pages[name] = subpath
+#html_additional_pages = {}
 
 # If false, no module index is generated.
 #html_domain_indices = True
@@ -226,6 +215,7 @@ man_pages = []
 
 # Automatically derive the list of man pages from the contents of the command
 # guide subdirectory.
+basedir = os.path.dirname(__file__)
 man_page_authors = "Maintained by The LLVM Team (http://llvm.org/)."
 command_guide_subpath = 'CommandGuide'
 command_guide_path = os.path.join(basedir, command_guide_subpath)