Skip to content

Commit c5a8721

Browse files
author
Sam Kleinman
committed
build: minor correction to prevent unneccessary builds
1 parent e23196d commit c5a8721

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

makefile

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ publish-if-up-to-date:
8181
@bin/published-build-check $(current-branch) $(last-commit)
8282
$(MAKE) publish
8383

84-
publish:initial-dependencies
84+
publish:initial-dependencies pre-build-dependencies
8585
$(MAKE) sphinx-components
8686
$(MAKE) static-components post-processing
8787
@echo [build]: $(manual-branch) branch is succeessfully deployed to '$(public-output)'.
@@ -112,8 +112,8 @@ endif
112112
# access these targets through the ``publish`` target.
113113
.PHONY: initial-dependencies static-components sphinx-components post-processing
114114

115-
initial-dependencies:source/includes/hash.rst source/about.txt
116-
$(MAKE) $(public-branch-output)/MongoDB-Manual.epub
115+
pre-build-dependencies:source/includes/hash.rst source/about.txt
116+
initial-dependencies:$(public-branch-output)/MongoDB-Manual.epub
117117
@echo [build]: completed the pre-publication routine for the $(manual-branch) branch of the Manual.
118118
static-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.
@@ -127,9 +127,8 @@ sphinx-components:$(public-branch-output)/ $(public-branch-output)/sitemap.xml.g
127127
#
128128

129129
.PHONY:source/about.txt source/includes/hash.rst setup
130-
hash-output-file = source/includes/hash.rst
131130

132-
setup:$(hash-output-file)
131+
setup:source/includes/hash.rst
133132
@mkdir -p $(public-branch-output)
134133
@echo [build]: created $(public-branch-output)
135134

@@ -254,8 +253,8 @@ clean-all:
254253
-rm -rf $(output)/*
255254

256255
# Needed for all sphinx builds.
257-
$(sphinx-conf):conf.py
258-
@python bin/copy-if-needed.py -i $< -o $@ -b sphinx
256+
$(sphinx-conf):
257+
@python bin/copy-if-needed.py -i conf.py -o $@ -b sphinx
259258

260259
######################################################################
261260
#
@@ -264,19 +263,19 @@ $(sphinx-conf):conf.py
264263
######################################################################
265264

266265
.PHONY: html dirhtml singlehtml epub sitemap
267-
html:$(sphinx-conf) $(hash-output-file)
266+
html:$(sphinx-conf)
268267
@echo [html]: build starting at `date`.
269268
@mkdir -p $(branch-output)/html
270269
@echo [html]: created $(branch-output)/html
271270
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(branch-output)/html
272271
@echo [html]: build complete at `date`.
273-
dirhtml:$(sphinx-conf) $(hash-output-file)
272+
dirhtml:$(sphinx-conf)
274273
@echo [dirhtml]: build starting at `date`.
275274
@mkdir -p $(branch-output)/dirhtml
276275
@echo [dirhtml]: created $(branch-output)/dirhtml
277276
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(branch-output)/dirhtml
278277
@echo [dirhtml]: build complete at `date`.
279-
singlehtml:$(sphinx-conf) $(hash-output-file)
278+
singlehtml:$(sphinx-conf)
280279
@echo [singlehtml]: build started at `date`.
281280
@mkdir -p $(branch-output)/singlehtml
282281
@echo [singlehtml]: created $(branch-output)/singlehtml
@@ -285,7 +284,7 @@ singlehtml:$(sphinx-conf) $(hash-output-file)
285284

286285
epub-command = $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(branch-output)/epub
287286
epub-filter = sed $(SED_ARGS_REGEX) -e '/^WARNING: unknown mimetype.*ignoring$$/d' -e '/^WARNING: search index.*incomplete.$$/d'
288-
epub:$(sphinx-conf) $(hash-output-file)
287+
epub:pre-build-dependencies $(sphinx-conf)
289288
@echo [epub]: starting epub build at `date`.
290289
@mkdir -p $(branch-output)/epub
291290
@echo [epub]: created $(branch-output)/epub
@@ -321,7 +320,7 @@ $(branch-output)/sitemap.xml.gz:$(public-output)/manual
321320
UNCOMPRESSED_MAN := $(wildcard $(branch-output)/man/*.1)
322321
COMPRESSED_MAN := $(subst .1,.1.gz,$(UNCOMPRESSED_MAN))
323322

324-
man:$(sphinx-conf) $(hash-output-file)
323+
man:$(sphinx-conf)
325324
@echo [man]: starting man build at `date`.
326325
@mkdir -p $(branch-output)/man
327326
@echo [build]: created $(branch-output)/man
@@ -343,13 +342,13 @@ $(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
343342
.PHONY: aspirational aspiration draft draft-pdf draft-pdfs
344343
aspiration:draft
345344
aspirational:draft
346-
draft:$(sphinx-conf) $(hash-output-file)
345+
draft:$(sphinx-conf)
347346
@echo [draft]: draft-html started at `date`.
348347
@mkdir -p $(branch-output)/draft
349348
@echo [draft]: created $(branch-output)/draft
350349
$(SPHINXBUILD) -b html $(DRAFTSPHINXOPTS) $(branch-output)/draft
351350
@echo [draft]: draft-html build finished at `date`.
352-
draft-latex:$(sphinx-conf) $(hash-output-file)
351+
draft-latex:$(sphinx-conf)
353352
@echo [draft]: draft-latex build started at `date`.
354353
@mkdir -p $(branch-output)/draft-latex
355354
@echo [draft]: created $(branch-output)/draft-latex
@@ -367,25 +366,25 @@ draft-pdfs:draft-latex draft-pdf
367366
##########################################################################
368367

369368
.PHONY: changes linkcheck json doctest
370-
json:$(sphinx-conf) $(hash-output-file)
369+
json:$(sphinx-conf)
371370
@echo [json]: build started at `date`.
372371
@mkdir -p $(branch-output)/json
373372
@echo [json]: created $(branch-output)/json
374373
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(branch-output)/json
375374
@echo [json]: build finished at `date`.
376-
changes:$(sphinx-conf) $(hash-output-file)
375+
changes:$(sphinx-conf)
377376
@echo [changes]: build started at `date`.
378377
@mkdir -p $(branch-output)/changes
379378
@echo [changes]: created $(branch-output)/changes
380379
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(branch-output)/changes
381380
@echo [changes]: build finished at `date`.
382-
linkcheck:$(sphinx-conf) $(hash-output-file)
381+
linkcheck:$(sphinx-conf)
383382
@echo [link]: build started at `date`.
384383
@mkdir -p $(branch-output)/linkcheck
385384
@echo [link]: created $(branch-output)/linkcheck
386385
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(branch-output)/linkcheck
387386
@echo [link]: Link check complete at `date`. See $(branch-output)/linkcheck/output.txt.
388-
doctest:$(sphinx-conf) $(hash-output-file)
387+
doctest:$(sphinx-conf)
389388
@echo [test]: build started at `date`.
390389
@mkdir -p $(branch-output)/doctest
391390
@echo [test]: created $(branch-output)/doctest

0 commit comments

Comments
 (0)