Skip to content

Commit 66c7355

Browse files
author
Sam Kleinman
committed
minor: build whitespace changes and clarrifications
1 parent d5922ae commit 66c7355

File tree

1 file changed

+14
-37
lines changed

1 file changed

+14
-37
lines changed

makefile

Lines changed: 14 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ALLSPHINXOPTS = -q -d $(branch-output)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPT
4141
POSPHINXOPTS = -q -d $(branch-output)/doctrees-gettext $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
4242
DRAFTSPHINXOPTS = -q -d $(branch-output)/draft-doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) draft
4343

44-
.PHONY: publish help clean push-dc1 push-dc2
44+
.PHONY: help
4545
help:
4646
@echo "Please use \`make <target>' where <target> is one of"
4747
@echo " html to make standalone HTML files"
@@ -81,26 +81,19 @@ include bin/makefile.compatibility
8181
$(output)/makefile.%:bin/makefile-builder/%.py bin/makefile_builder.py bin/builder_data.py
8282
@$(PYTHONBIN) bin/makefile-builder/$(subst .,,$(suffix $@)).py $@
8383

84-
#
8584
# Meta targets that control the build and publication process.
86-
#
87-
88-
.PHONY: push publish-if-up-to-date
89-
85+
.PHONY: publish push publish-if-up-to-date push-all
9086
push:publish-if-up-to-date
9187
@echo [build]: copying the new $(current-branch) build to the web servers.
9288
@$(MAKE) MODE='push' push-dc1 push-dc2
9389
@echo [build]: deployed a new build of the $(current-branch) branch of the Manual.
94-
9590
push-all:publish
9691
@echo [build]: copying the full docs site to the web servers.
9792
@$(MAKE) MODE='push' push-all-dc1 push-all-dc2
9893
@echo [build]: deployed a new build of the full Manual.
99-
10094
publish-if-up-to-date:
10195
@bin/published-build-check $(current-branch) $(last-commit)
10296
@$(MAKE) publish
103-
10497
publish:initial-dependencies pre-build-dependencies
10598
@echo [build]: starting build of sphinx components built at `date`
10699
@$(MAKE) sphinx-components
@@ -110,16 +103,13 @@ publish:initial-dependencies pre-build-dependencies
110103
@echo [build]: all static components built at `date`
111104
@echo [build]: $(manual-branch) branch is succeessfully deployed to '$(public-output)'.
112105

113-
#
114106
# Targets for pushing the new build to the web servers.
115-
#
116-
117107
ifeq ($(MODE),push)
108+
.PHONY: push-dc1 push-dc2 push-dc1-all push-dc2-all
118109
push-dc1:
119110
rsync -arz $(public-output)/$(current-branch)/ [email protected]:/data/sites/docs/$(current-branch)
120111
push-dc2:
121112
rsync -arz $(public-output)/$(current-branch)/ [email protected]:/data/sites/docs/$(current-branch)
122-
123113
push-all-dc1:
124114
rsync -arz $(public-output)/ [email protected]:/data/sites/docs
125115
push-all-dc2:
@@ -147,10 +137,6 @@ post-processing:error-pages links
147137
sphinx-components:manual-pdfs $(public-branch-output)/single $(public-branch-output)/single/index.html $(public-branch-output) $(public-branch-output)/sitemap.xml.gz
148138
@echo [build]: completed $@ buildstep.
149139

150-
#
151-
# Build the HTML components of the build.
152-
#
153-
154140
# Initial build steps, exporting the current commit to the build.
155141
.PHONY:source/about.txt source/includes/hash.rst setup $(public-branch-output)/release.txt
156142
setup:source/includes/hash.rst
@@ -181,10 +167,7 @@ $(branch-output)/singlehtml/contents.html:$(branch-output)/singlehtml
181167
$(branch-output)/epub/MongoDB.epub:epub
182168
$(public-branch-output)/MongoDB-Manual.epub:$(public-branch-output)/MongoDB-Manual-$(current-branch).epub
183169

184-
#
185170
# Migrating and processing the dirhtml and singlehtml as needed.
186-
#
187-
188171
$(public-branch-output):$(branch-output)/dirhtml
189172
@cp -R $</* $@
190173
@rm -rf $@/meta/reference $@/meta/use-cases
@@ -222,13 +205,11 @@ clean-all:
222205
######################################################################
223206

224207
.PHONY: sitemap
225-
226-
SITEMAPBUILD = $(PYTHONBIN) bin/sitemap_gen.py
227208
sitemap:$(branch-output)/sitemap.xml.gz
228-
$(branch-output)/sitemap.xml.gz:$(branch-output)/dirhtml
209+
$(branch-output)/sitemap.xml.gz:$(public-output)/manual $(branch-output)/dirhtml
229210
@echo [sitemap]: starting sitemap build at `date`.
230211
@echo [sitemap]: build time\: `date` >> $(branch-output)/sitemap-build.log
231-
@$(SITEMAPBUILD) --testing --config=conf-sitemap.xml 2>&1 >> $(branch-output)/sitemap-build.log
212+
@$(PYTHONBIN) bin/sitemap_gen.py --testing --config=conf-sitemap.xml 2>&1 >> $(branch-output)/sitemap-build.log
232213
@mv build/sitemap.xml.gz $@
233214
@echo [sitemap]: sitemap built at `date`.
234215

@@ -242,9 +223,8 @@ $(branch-output)/sitemap.xml.gz:$(branch-output)/dirhtml
242223
UNCOMPRESSED_MAN := $(wildcard $(branch-output)/man/*.1)
243224
COMPRESSED_MAN := $(subst .1,.1.gz,$(UNCOMPRESSED_MAN))
244225

245-
# Targets to build compressed man pages.
246-
build-man: man $(COMPRESSED_MAN)
247-
compress-man: $(COMPRESSED_MAN)
226+
build-man:man $(COMPRESSED_MAN)
227+
compress-man:$(COMPRESSED_MAN)
248228
$(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
249229
gzip $< -c > $@
250230

@@ -258,7 +238,6 @@ $(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
258238
aspiration:draft-html
259239
aspirational:draft-html
260240
draft:draft-html
261-
262241
draft-pdf:$(subst .tex,.pdf,$(wildcard $(branch-output)/draft-latex/*.tex))
263242
draft-pdfs:draft-latex draft-pdf
264243

@@ -270,19 +249,17 @@ draft-pdfs:draft-latex draft-pdf
270249

271250
LATEX_CORRECTION = "s/(index|bfcode)\{(.*!*)*--(.*)\}/\1\{\2-\{-\}\3\}/g"
272251
LATEX_LINK_CORRECTION = "s%\\\code\{/%\\\code\{http://docs.mongodb.org/$(current-if-not-manual)/%g"
252+
PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction batchmode --output-directory $(branch-output)/latex/
273253

274-
.PHONY:pdfs
275-
276-
# Uses 'latex' target in the production build section.
254+
# Uses 'latex' target to generate latex files.
277255

256+
.PHONY:pdfs
278257
$(branch-output)/latex/%.tex:
279258
@sed $(SED_ARGS_FILE) -e $(LATEX_CORRECTION) -e $(LATEX_CORRECTION) -e $(LATEX_LINK_CORRECTION) $@
280259
@echo [latex]: fixing the Sphinx ouput of '$@'.
281260

282261
pdfs:$(subst .tex,.pdf,$(wildcard $(branch-output)/latex/*.tex))
283262

284-
PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction batchmode --output-directory $(branch-output)/latex/
285-
286263
%.pdf:%.tex
287264
@echo [pdf]: pdf compilation of $@, started at `date`.
288265
@touch $(basename $@)-pdflatex.log
@@ -297,13 +274,13 @@ PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction
297274
@echo [pdf]: see '$(basename $@)-pdflatex.log' for a full report of the pdf build process.
298275
@echo [pdf]: pdf compilation of $@, complete at `date`.
299276

300-
##########################################################################
277+
###########################################################################
301278
#
302-
# Archiving $(public-output) for cleaner full rebuilds
279+
# Archiving $(public-output) for more sane testing, and risk free cleaning.
303280
#
304-
##########################################################################
281+
###########################################################################
305282

306283
archive:$(public-output).$(timestamp).tar.gz
307284
@echo [archive]: created $< archive.
308-
$(public-output).$(ARCHIVE_DATE).tar.gz:$(public-output)
285+
$(public-output).%.tar.gz:$(public-output)
309286
tar -czvf $@ $<

0 commit comments

Comments
 (0)