Skip to content

Commit 8eaff0d

Browse files
committed
CDRIVER-2014 update build config for sphinx-build
Ensure man pages are distributed and that sphinx cache files .buildinfo and .doctrees are cleaned.
1 parent ebd2a77 commit 8eaff0d

File tree

4 files changed

+30
-55
lines changed

4 files changed

+30
-55
lines changed

Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ EXTRA_DIST += \
5555
EXTRA_DIST += $(wildcard orchestration_configs/*/*)
5656

5757
dist-hook:
58+
-rm -rf $(distdir)/doc/html/.buildinfo $(distdir)/doc/html/.doctrees
59+
-rm -rf $(distdir)/doc/man/.buildinfo $(distdir)/doc/man/.doctrees
60+
5861
@if test -d "$(srcdir)/.git"; then \
5962
(cd "$(srcdir)" && \
6063
$(top_srcdir)/build/autotools/missing --run git log --stat ) > ChangeLog.tmp \
@@ -65,6 +68,9 @@ dist-hook:
6568
echo A git checkout is required to generate a ChangeLog >&2; \
6669
fi
6770

71+
clean-local:
72+
rm -rf $(CLEANFILES)
73+
6874
uninstall-local:
6975
-rmdir $(mongocdocdir)/doc $(mongocdocdir)/html
7076
-rm -r $(mongocdocdir)

doc/Makefile.am

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,3 @@ EXTRA_DIST += \
1010
doc/mongoc-theme/theme.conf \
1111
doc/taglist.py \
1212
$(wildcard doc/includes/*.txt)
13-
14-
dist-hook: man html
15-
16-
clean-local:
17-
-rm -rf doc/man/.buildinfo doc/man/.doctrees
18-
-rm -rf doc/html/.buildinfo doc/html/.doctrees doc/html/_static

doc/html/Makefile.am

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,23 @@
1-
CLEANFILES += $(wildcard doc/html/*.html)
2-
CLEANFILES += $(wildcard doc/html/*.css)
3-
CLEANFILES += $(wildcard doc/html/*.js)
4-
CLEANFILES += $(wildcard doc/html/*.png)
5-
CLEANFILES += doc/html/.nojekyll doc/html/objects.inv doc/html/searchindex.js
1+
SPHINX_HTML_FILES = \
2+
$(wildcard doc/html/*.html) \
3+
$(wildcard doc/html/*.css) \
4+
$(wildcard doc/html/*.js) \
5+
$(wildcard doc/html/*.png) \
6+
$(wildcard doc/html/_static/*.css) \
7+
$(wildcard doc/html/_static/*.js) \
8+
$(wildcard doc/html/_static/*.png) \
9+
doc/html/.nojekyll \
10+
doc/html/objects.inv
11+
12+
CLEANFILES += $(SPHINX_HTML_FILES) doc/html/.doctrees doc/man/.buildinfo
613

714
.PHONY: doc/html
815

9-
# "E" is "ignore cache".
10-
doc/html:
16+
doc/html: $(SPHINX_HTML_FILES)
17+
18+
# sphinx-build "-E" is "ignore cache".
19+
$(SPHINX_HTML_FILES):
1120
-mkdir -p doc/html
1221
$(SPHINX_BUILD) -qEW $(top_srcdir)/doc doc/html
1322

14-
SPHINX_HTML_FILES = \
15-
doc/html/.nojekyll \
16-
doc/html/_static \
17-
doc/html/_static/ajax-loader.gif \
18-
doc/html/_static/basic.css \
19-
doc/html/_static/comment-bright.png \
20-
doc/html/_static/comment-close.png \
21-
doc/html/_static/comment.png \
22-
doc/html/_static/doctools.js \
23-
doc/html/_static/down-pressed.png \
24-
doc/html/_static/down.png \
25-
doc/html/_static/file.png \
26-
doc/html/_static/jquery-3.1.0.js \
27-
doc/html/_static/jquery.js \
28-
doc/html/_static/minus.png \
29-
doc/html/_static/mongoc.css \
30-
doc/html/_static/plus.png \
31-
doc/html/_static/pygments.css \
32-
doc/html/_static/searchtools.js \
33-
doc/html/_static/underscore-1.3.1.js \
34-
doc/html/_static/underscore.js \
35-
doc/html/_static/up-pressed.png \
36-
doc/html/_static/up.png \
37-
doc/html/_static/websupport.js \
38-
doc/html/objects.inv \
39-
doc/html/searchindex.js
40-
4123
EXTRA_DIST += doc/html
42-
EXTRA_DIST += $(SPHINX_HTML_FILES)

doc/man/Makefile.am

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
BUILT_MAN_FILES = $(wildcard doc/man/*.3)
2-
CLEANFILES += $(wildcard doc/man/*.3)
1+
CLEANFILES += $(wildcard doc/man/*.3) doc/man/.doctrees doc/man/.buildinfo
32

4-
dist_man_MANS = $(BUILT_MAN_FILES)
5-
# Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals.
6-
# Unlike with other dist primaries, the files are not distributed if the
7-
# conditional is false.
8-
# Work the bug around until it is fixed:
9-
dist_noinst_DATA = $(dist_man_MANS)
3+
.PHONY: doc/man
104

11-
man3_MANS = $(BUILT_MAN_FILES)
5+
dist_man_MANS = $(wildcard doc/man/*.3)
126

13-
.PHONY: man
7+
man3_MANS = $(wildcard doc/man/*.3)
148

15-
# "E" is "ignore cache", "b" is build type.
16-
man:
9+
10+
# sphinx-build "-E" is "ignore cache", "b" is build type.
11+
doc/man:
1712
-mkdir -p doc/man
1813
$(SPHINX_BUILD) -qEW -b man $(top_srcdir)/doc doc/man
1914

20-
man: $(MAN_FILES_TO_BUILD)
21-
EXTRA_DIST += $(MAN_FILES_TO_BUILD)
15+
EXTRA_DIST += doc/man

0 commit comments

Comments
 (0)