Skip to content

Commit 68e3df1

Browse files
committed
DOC: add option to Makefile
1 parent 43c13c6 commit 68e3df1

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

doc/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ html-noplot:
3333
@echo
3434
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
3535

36+
# This will skip the directories listed in the skip_subdirs variable
37+
# in conf.py. Edit this by hand if you want to change what sections
38+
# of the docs get built. Can be much faster. However, reset conf.py
39+
# to original values before pushig to github.
40+
html-skip-dirs:
41+
$(SPHINXBUILD) -D skip_dirs=1 -b html $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS) $(O)
42+
3643
# Catch-all target: route all unknown targets to Sphinx using the new
3744
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
3845
%: Makefile

doc/conf.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,15 @@
4141
# Note if any of the sphinx-galleries are skipped then they
4242
# will not be built using sphinx-gallery.
4343
skip_subdirs = []
44-
if False:
45-
skip_subdirs = ['users/prev_whats_new/*',
46-
'gallery/*',
47-
'api/*',
48-
'tutorials/*',
49-
'plot_types/*',
50-
'devel/*']
44+
if 'skip_dirs=1' in sys.argv:
45+
skip_subdirs = [
46+
'users/prev_whats_new/*',
47+
'gallery/*',
48+
'api/*',
49+
'tutorials/*',
50+
'plot_types/*',
51+
'devel/*'
52+
]
5153

5254
# Parse year using SOURCE_DATE_EPOCH, falling back to current time.
5355
# https://reproducible-builds.org/specs/source-date-epoch/
@@ -735,5 +737,6 @@ def setup(app):
735737
bld_type = 'dev'
736738
else:
737739
bld_type = 'rel'
740+
app.add_config_value('skip_dirs', 0, '')
738741
app.add_config_value('releaselevel', bld_type, 'env')
739742
app.connect('html-page-context', add_html_cache_busting, priority=1000)

0 commit comments

Comments
 (0)