2626current-if-not-manual = $(current-branch )
2727endif
2828
29- sphinx-conf = $(branch-output ) /conf.py
3029# Sphinx variables.
31- SPHINXOPTS = -c $(branch-output )
30+ sphinx-conf = $(branch-output ) /conf.py
31+ SPHINXOPTS = -c ./
3232SPHINXBUILD = sphinx-build
3333
3434ifdef NITPICK
@@ -112,14 +112,14 @@ endif
112112# access these targets through the ``publish`` target.
113113.PHONY : initial-dependencies static-components sphinx-components post-processing
114114
115- pre-build-dependencies :source/includes/hash.rst source/about.txt
115+ pre-build-dependencies :setup source/includes/hash.rst source/about.txt
116116initial-dependencies :$(public-branch-output ) /MongoDB-Manual.epub
117117 @echo [build]: completed the pre-publication routine for the $(manual-branch ) branch of the Manual.
118118static-components :$(public-output ) /index.html $(public-output ) /10gen-gpg-key.asc $(public-branch-output ) /.htaccess $(public-branch-output ) /release.txt $(public-output ) /osd.xml
119119 @echo [build]: completed building and migrating all non-Sphinx components of the build.
120120post-processing :error-pages links
121121 @echo [build]: completed all post processing steps.
122- sphinx-components :$(public-branch-output ) / $(public-branch-output ) /sitemap.xml.gz $(public-branch-output ) /MongoDB-Manual.pdf $(public-branch-output ) /single $(public-branch-output ) /single/index.html
122+ sphinx-components :$(public-branch-output ) /MongoDB-Manual.pdf $(public-branch-output ) /single $(public-branch-output ) /single/index.html $(public-branch-output ) / $(public-branch-output ) /sitemap.xml.gz
123123 @echo [build]: completed the publication routine for all Sphinx Components of the Manual Build.
124124
125125#
@@ -133,7 +133,7 @@ setup:source/includes/hash.rst
133133 @echo [build]: created $(public-branch-output )
134134
135135source/includes/hash.rst :
136- @./ bin/update_hash.py
136+ @$( PYTHONBIN ) bin/update_hash.py
137137 @echo [build]: \( re\) generated $@ .
138138source/about.txt :setup
139139 @touch $@
@@ -155,7 +155,7 @@ $(branch-output)/singlehtml/contents.html:$(branch-output)/singlehtml
155155$(branch-output ) /latex/MongoDB.tex :latex
156156$(branch-output ) /latex/MongoDB.pdf :$(branch-output ) /latex/MongoDB-Manual.tex
157157$(branch-output ) /latex/MongoDB-Manual.tex :$(branch-output ) /latex/MongoDB.tex
158- @python bin/copy-if-needed.py -i $< -o $@ -b pdf
158+ @$( PYTHONBIN ) bin/copy-if-needed.py -i $< -o $@ -b pdf
159159$(public-branch-output ) /MongoDB-Manual-$(current-branch ) .pdf :$(branch-output ) /latex/MongoDB-Manual.pdf
160160 @cp $< $@
161161 @echo [build]: migrated $@
@@ -253,8 +253,26 @@ clean-all:
253253 -rm -rf $(output ) /*
254254
255255# Needed for all sphinx builds.
256- $(sphinx-conf ) :
257- @python bin/copy-if-needed.py -i conf.py -o $@ -b sphinx
256+ .PHONY : $(branch-output ) /themes $(branch-output ) /bin $(branch-output ) /.static $(branch-output ) /.templates
257+
258+ # $(sphinx-conf):
259+ # @$(PYTHONBIN) bin/copy-if-needed.py -i conf.py -o $@ -b sphinx
260+ # $(branch-output)/themes:themes
261+ # @mkdir -p $@
262+ # @rsync --recursive --delete $</ $@
263+ # @echo [build]: syncing '$<' directory
264+ # $(branch-output)/bin:bin
265+ # @mkdir -p $@
266+ # @rsync --recursive --delete $</ $@
267+ # @echo [build]: syncing '$<' directory
268+ # $(branch-output)/.templates:.templates
269+ # @mkdir -p $@
270+ # @rsync --recursive --delete $</ $@
271+ # @echo [build]: syncing '$<' directory
272+ # $(branch-output)/.static:source/.static
273+ # @mkdir -p $@
274+ # @rsync --recursive --delete $</ $@
275+ # @echo [build]: syncing '$<' directory
258276
259277# #####################################################################
260278#
@@ -263,19 +281,19 @@ $(sphinx-conf):
263281# #####################################################################
264282
265283.PHONY : html dirhtml singlehtml epub sitemap
266- html :$( sphinx-conf )
284+ html :
267285 @echo [html]: build starting at ` date` .
268286 @mkdir -p $(branch-output ) /html
269287 @echo [html]: created $(branch-output ) /html
270288 $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(branch-output ) /html
271289 @echo [html]: build complete at ` date` .
272- dirhtml :$( sphinx-conf )
290+ dirhtml :
273291 @echo [dirhtml]: build starting at ` date` .
274292 @mkdir -p $(branch-output ) /dirhtml
275293 @echo [dirhtml]: created $(branch-output ) /dirhtml
276294 $(SPHINXBUILD ) -b dirhtml $(ALLSPHINXOPTS ) $(branch-output ) /dirhtml
277295 @echo [dirhtml]: build complete at ` date` .
278- singlehtml :$( sphinx-conf )
296+ singlehtml :
279297 @echo [singlehtml]: build started at ` date` .
280298 @mkdir -p $(branch-output ) /singlehtml
281299 @echo [singlehtml]: created $(branch-output ) /singlehtml
@@ -284,7 +302,7 @@ singlehtml:$(sphinx-conf)
284302
285303epub-command = $(SPHINXBUILD ) -b epub $(ALLSPHINXOPTS ) $(branch-output ) /epub
286304epub-filter = sed $(SED_ARGS_REGEX ) -e '/^WARNING: unknown mimetype.*ignoring$$/d' -e '/^WARNING: search index.*incomplete.$$/d'
287- epub :pre-build-dependencies $( sphinx-conf )
305+ epub : pre-build-dependencies
288306 @echo [epub]: starting epub build at ` date` .
289307 @mkdir -p $(branch-output ) /epub
290308 @echo [epub]: created $(branch-output ) /epub
@@ -320,7 +338,7 @@ $(branch-output)/sitemap.xml.gz:$(public-output)/manual
320338UNCOMPRESSED_MAN := $(wildcard $(branch-output ) /man/* .1)
321339COMPRESSED_MAN := $(subst .1,.1.gz,$(UNCOMPRESSED_MAN ) )
322340
323- man :$( sphinx-conf )
341+ man :
324342 @echo [man]: starting man build at ` date` .
325343 @mkdir -p $(branch-output ) /man
326344 @echo [build]: created $(branch-output ) /man
@@ -342,13 +360,13 @@ $(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
342360.PHONY : aspirational aspiration draft draft-pdf draft-pdfs
343361aspiration :draft
344362aspirational :draft
345- draft :$( sphinx-conf )
363+ draft :
346364 @echo [draft]: draft-html started at ` date` .
347365 @mkdir -p $(branch-output ) /draft
348366 @echo [draft]: created $(branch-output ) /draft
349367 $(SPHINXBUILD ) -b html $(DRAFTSPHINXOPTS ) $(branch-output ) /draft
350368 @echo [draft]: draft-html build finished at ` date` .
351- draft-latex :$( sphinx-conf )
369+ draft-latex :
352370 @echo [draft]: draft-latex build started at ` date` .
353371 @mkdir -p $(branch-output ) /draft-latex
354372 @echo [draft]: created $(branch-output ) /draft-latex
@@ -366,25 +384,25 @@ draft-pdfs:draft-latex draft-pdf
366384# #########################################################################
367385
368386.PHONY : changes linkcheck json doctest
369- json :$( sphinx-conf )
387+ json :
370388 @echo [json]: build started at ` date` .
371389 @mkdir -p $(branch-output ) /json
372390 @echo [json]: created $(branch-output ) /json
373391 $(SPHINXBUILD ) -b json $(ALLSPHINXOPTS ) $(branch-output ) /json
374392 @echo [json]: build finished at ` date` .
375- changes :$( sphinx-conf )
393+ changes :
376394 @echo [changes]: build started at ` date` .
377395 @mkdir -p $(branch-output ) /changes
378396 @echo [changes]: created $(branch-output ) /changes
379397 $(SPHINXBUILD ) -b changes $(ALLSPHINXOPTS ) $(branch-output ) /changes
380398 @echo [changes]: build finished at ` date` .
381- linkcheck :$( sphinx-conf )
399+ linkcheck :
382400 @echo [link]: build started at ` date` .
383401 @mkdir -p $(branch-output ) /linkcheck
384402 @echo [link]: created $(branch-output ) /linkcheck
385403 $(SPHINXBUILD ) -b linkcheck $(ALLSPHINXOPTS ) $(branch-output ) /linkcheck
386404 @echo [link]: Link check complete at ` date` . See $(branch-output ) /linkcheck/output.txt.
387- doctest :$( sphinx-conf )
405+ doctest :
388406 @echo [test]: build started at ` date` .
389407 @mkdir -p $(branch-output ) /doctest
390408 @echo [test]: created $(branch-output ) /doctest
@@ -399,7 +417,7 @@ doctest:$(sphinx-conf)
399417
400418.PHONY :pdfs latex latexpdf
401419
402- latex :$( sphinx-conf ) $( hash-output-file )
420+ latex :
403421 @echo [latex]: starting TeX file generation at ` date` .
404422 @mkdir -p $(branch-output ) /latex
405423 $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(branch-output ) /latex
0 commit comments