mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-15 17:30:42 +01:00
Merge pull request #6257 from alorbach/cursor/fix-rsyslog-warning-message-b1e2
doc: enable parallel Sphinx builds; silence edit_on_github
This commit is contained in:
commit
7cf2df63d9
13
doc/Makefile
13
doc/Makefile
@ -1,32 +1,43 @@
|
|||||||
# Makefile for rsyslog-doc
|
# Makefile for rsyslog-doc
|
||||||
#
|
#
|
||||||
# You can set these variables from the command line.
|
# You can set these variables from the command line.
|
||||||
SPHINXOPTS ?=
|
SPHINXOPTS := $(SPHINXOPTS)
|
||||||
SPHINXBUILD ?= sphinx-build
|
SPHINXBUILD ?= sphinx-build
|
||||||
SOURCEDIR = source
|
SOURCEDIR = source
|
||||||
BUILDDIR = build
|
BUILDDIR = build
|
||||||
|
|
||||||
|
# Function to add parallel jobs from MAKEFLAGS to SPHINXOPTS
|
||||||
|
define add_parallel_jobs
|
||||||
|
$(eval SPHINXOPTS += $(if $(filter -j%,$(SPHINXOPTS)),,$(filter -j%,$(MAKEFLAGS))))
|
||||||
|
endef
|
||||||
|
|
||||||
.PHONY: help clean html singlehtml json alljson
|
.PHONY: help clean html singlehtml json alljson
|
||||||
|
|
||||||
help:
|
help:
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf "$(BUILDDIR)"
|
rm -rf "$(BUILDDIR)"
|
||||||
|
|
||||||
html:
|
html:
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
singlehtml: # -t minimal_build triggers stripped-down config in conf.py
|
singlehtml: # -t minimal_build triggers stripped-down config in conf.py
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -M singlehtml "$(SOURCEDIR)" "$(BUILDDIR)" -t minimal_build $(SPHINXOPTS) -D rst_epilog='' $(O)
|
@$(SPHINXBUILD) -M singlehtml "$(SOURCEDIR)" "$(BUILDDIR)" -t minimal_build $(SPHINXOPTS) -D rst_epilog='' $(O)
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The minimal single page HTML is in $(BUILDDIR)/singlehtml."
|
@echo "Build finished. The minimal single page HTML is in $(BUILDDIR)/singlehtml."
|
||||||
|
|
||||||
json:
|
json:
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -b json "$(SOURCEDIR)" "$(BUILDDIR)/json" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -b json "$(SOURCEDIR)" "$(BUILDDIR)/json" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
alljson: json
|
alljson: json
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -b json "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -b json "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
%:
|
%:
|
||||||
|
@$(call add_parallel_jobs)
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|||||||
@ -40,4 +40,12 @@ def setup(app):
|
|||||||
app.add_config_value('edit_on_github_project', '', True)
|
app.add_config_value('edit_on_github_project', '', True)
|
||||||
app.add_config_value('edit_on_github_branch', 'master', True)
|
app.add_config_value('edit_on_github_branch', 'master', True)
|
||||||
app.connect('html-page-context', html_page_context)
|
app.connect('html-page-context', html_page_context)
|
||||||
|
# Declare the extension as safe for Sphinx parallel reading/writing.
|
||||||
|
# This extension does not maintain global mutable state and only
|
||||||
|
# augments per-page rendering context, so it is safe.
|
||||||
|
return {
|
||||||
|
'version': '1.0',
|
||||||
|
'parallel_read_safe': True,
|
||||||
|
'parallel_write_safe': True,
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user