Skip to content

Commit 98b423d

Browse files
author
Sam Kleinman
committed
build: clarifying build timing and steps
1 parent 24bcd34 commit 98b423d

File tree

1 file changed

+49
-34
lines changed

1 file changed

+49
-34
lines changed

makefile

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ $(public-branch-output)/meta/410/index.html:$(branch-output)/dirhtml/meta/410/in
230230
@echo [web]: processed error page '$@'
231231

232232

233-
LINKS = $(public-branch-output)/reference/reIndex $(public-branch-output)/tutorials $(public-branch-output)/reference/methods
233+
LINKS = $(public-branch-output)/reference/reIndex $(public-branch-output)/tutorials $(public-branch-output)/reference/methods
234234
.PHONY: links $(LINKS)
235235
links: $(LINKS)
236236

@@ -257,30 +257,34 @@ clean-all:
257257

258258
.PHONY: html dirhtml singlehtml epub sitemap
259259
html:
260+
261+
@echo [html]: build starting at `date`.
260262
@mkdir -p $(branch-output)/html
261-
@echo [build]: created $(branch-output)/html
263+
@echo [html]: created $(branch-output)/html
262264
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(branch-output)/html
263-
@echo [HTML]: build complete.
265+
@echo [html]: build complete at `date`.
264266
dirhtml:
267+
@echo [dirhtml]: build starting at `date`.
265268
@mkdir -p $(branch-output)/dirhtml
266-
@echo [build]: created $(branch-output)/dirhtml
269+
@echo [dirhtml]: created $(branch-output)/dirhtml
267270
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(branch-output)/dirhtml
268-
@echo [DIR-HTML]: build complete.
271+
@echo [dirhtml]: build complete at `date`.
269272
singlehtml:
273+
@echo [singlehtml]: build started at `date`.
270274
@mkdir -p $(branch-output)/singlehtml
271-
@echo [build]: created $(branch-output)/singlehtml
275+
@echo [singlehtml]: created $(branch-output)/singlehtml
272276
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(branch-output)/singlehtml
273-
@echo [SINGLE-HTML]: build complete.
277+
@echo [singlehtml]: build complete at `date`.
274278

275279
epub-command = $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(branch-output)/epub
276280
epub-filter = sed $(SED_ARGS_REGEX) -e '/^WARNING: unknown mimetype.*ignoring$$/d' -e '/^WARNING: search index.*incomplete.$$/d'
277281
epub:
282+
@echo [epub]: starting epub build at `date`.
278283
@mkdir -p $(branch-output)/epub
279-
@echo [build]: created $(branch-output)/epub
280-
@echo [EPUB]: starting epub build.
284+
@echo [epub]: created $(branch-output)/epub
281285
@echo $(epub-command)
282286
@{ $(epub-command) 2>&1 1>&3 | $(epub-filter) 1>&2; } 3>&1
283-
@echo [EPUB]: Build complete.
287+
@echo [epub]: build complete at `date`.
284288

285289
######################################################################
286290
#
@@ -299,11 +303,11 @@ $(branch-output)/sitemap.xml.gz:$(branch-output)/dirhtml
299303
SITEMAPBUILD = $(PYTHONBIN) bin/sitemap_gen.py
300304
sitemap:$(branch-output)/sitemap.xml.gz
301305
$(branch-output)/sitemap.xml.gz:$(public-output)/manual
302-
@echo [SITEMAP]: starting sitemap build at `date`.
303-
@echo [SITEMAP]: build time\: `date` >> $(branch-output)/sitemap-build.log
306+
@echo [sitemap]: starting sitemap build at `date`.
307+
@echo [sitemap]: build time\: `date` >> $(branch-output)/sitemap-build.log
304308
@$(SITEMAPBUILD) --testing --config=conf-sitemap.xml 2>&1 >> $(branch-output)/sitemap-build.log
305309
@mv build/sitemap.xml.gz $@
306-
@echo [SITEMAP]: sitemap built at `date`.
310+
@echo [sitemap]: sitemap built at `date`.
307311

308312

309313
######################################################################
@@ -317,10 +321,11 @@ UNCOMPRESSED_MAN := $(wildcard $(branch-output)/man/*.1)
317321
COMPRESSED_MAN := $(subst .1,.1.gz,$(UNCOMPRESSED_MAN))
318322

319323
man:
324+
@echo [man]: starting man build at `date`.
320325
@mkdir -p $(branch-output)/man
321326
@echo [build]: created $(branch-output)/man
322327
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(branch-output)/man
323-
@echo [MAN]: build complete.
328+
@echo [man]: build complete at `date`.
324329

325330
# Targets to build compressed man pages.
326331
build-man: man $(COMPRESSED_MAN)
@@ -338,15 +343,18 @@ $(branch-output)/man/%.1.gz: $(branch-output)/man/%.1
338343
aspiration:draft
339344
aspirational:draft
340345
draft:
346+
@echo [draft]: draft-html started at `date`.
341347
@mkdir -p $(branch-output)/draft
342-
@echo [build]: created $(branch-output)/draft
348+
@echo [draft]: created $(branch-output)/draft
343349
$(SPHINXBUILD) -b html $(DRAFTSPHINXOPTS) $(branch-output)/draft
344-
@echo [DRAFT]: HTML build finished.
350+
@echo [draft]: draft-html build finished at `date`.
345351
draft-latex:
352+
@echo [draft]: draft-latex build started at `date`.
346353
@mkdir -p $(branch-output)/draft-latex
347-
@echo [build]: created $(branch-output)/draft-latex
354+
@echo [draft]: created $(branch-output)/draft-latex
348355
$(SPHINXBUILD) -b latex $(DRAFTSPHINXOPTS) $(branch-output)/draft-latex
349-
@echo [DRAFT]: LaTeX build finished.
356+
@echo [draft]: draft-latex build finished at `date`.
357+
350358
draft-pdf:$(subst .tex,.pdf,$(wildcard $(branch-output)/draft-latex/*.tex))
351359
draft-pdfs:draft-latex draft-pdf
352360

@@ -359,25 +367,29 @@ draft-pdfs:draft-latex draft-pdf
359367

360368
.PHONY: changes linkcheck json doctest
361369
json:
370+
@echo [json]: build started at `date`.
362371
@mkdir -p $(branch-output)/json
363-
@echo [build]: created $(branch-output)/json
372+
@echo [json]: created $(branch-output)/json
364373
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(branch-output)/json
365-
@echo [JSON]: build finished.
374+
@echo [json]: build finished at `date`.
366375
changes:
376+
@echo [changes]: build started at `date`.
367377
@mkdir -p $(branch-output)/changes
368-
@echo [build]: created $(branch-output)/changes
378+
@echo [changes]: created $(branch-output)/changes
369379
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(branch-output)/changes
370-
@echo [CHANGES]: build finished.
380+
@echo [changes]: build finished at `date`.
371381
linkcheck:
382+
@echo [link]: build started at `date`.
372383
@mkdir -p $(branch-output)/linkcheck
373-
@echo [build]: created $(branch-output)/linkcheck
384+
@echo [link]: created $(branch-output)/linkcheck
374385
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(branch-output)/linkcheck
375-
@echo [LINK]: Link check complete. See $(branch-output)/linkcheck/output.txt.
386+
@echo [link]: Link check complete at `date`. See $(branch-output)/linkcheck/output.txt.
376387
doctest:
388+
@echo [test]: build started at `date`.
377389
@mkdir -p $(branch-output)/doctest
378-
@echo [build]: created $(branch-output)/doctest
390+
@echo [test]: created $(branch-output)/doctest
379391
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(branch-output)/doctest
380-
@echo [TEST]: doctest complete.
392+
@echo [test]: doctest complete at `date`.
381393

382394
######################################################################
383395
#
@@ -388,33 +400,36 @@ doctest:
388400
.PHONY:pdfs latex latexpdf
389401

390402
latex:
403+
@echo [latex]: starting TeX file generation at `date`.
391404
@mkdir -p $(branch-output)/latex
392405
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(branch-output)/latex
393-
@echo [latex]: TeX file generated.
406+
@echo [latex]: TeX file generated at `date`.
394407
latexpdf:latex
395408
$(MAKE) -C $(branch-output)/latex all-pdf
396-
@echo [PDF]: build complete.
409+
@echo [pdf]: build complete.
397410

398411
LATEX_CORRECTION = "s/(index|bfcode)\{(.*!*)*--(.*)\}/\1\{\2-\{-\}\3\}/g"
399412

400413
$(branch-output)/latex/%.tex:
401414
@sed $(SED_ARGS_FILE) -e $(LATEX_CORRECTION) -e $(LATEX_CORRECTION) $@
402-
@echo [build]: fixing '$@' TeX from the Sphinx output
415+
@echo [latex]: fixing '$@' TeX from the Sphinx output
403416

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

406419
PDFLATEXCOMMAND = TEXINPUTS=".:$(branch-output)/latex/:" pdflatex --interaction batchmode --output-directory $(branch-output)/latex/
407420

408421
%.pdf:%.tex
422+
@echo [pdf]: pdf compilation started at `date`.
409423
@$(PDFLATEXCOMMAND) $(LATEXOPTS) '$<' >|$@.log
410-
@echo [PDF]: \(1/4\) pdflatex $<
424+
@echo [pdf]: \(1/4\) pdflatex $<
411425
@-makeindex -s $(branch-output)/latex/python.ist '$(basename $<).idx' >>$@.log 2>&1
412-
@echo [PDF]: \(2/4\) Indexing: $(basename $<).idx
426+
@echo [pdf]: \(2/4\) Indexing: $(basename $<).idx
413427
@$(PDFLATEXCOMMAND) $(LATEXOPTS) '$<' >>$@.log
414-
@echo [PDF]: \(3/4\) pdflatex $<
428+
@echo [pdf]: \(3/4\) pdflatex $<
415429
@$(PDFLATEXCOMMAND) $(LATEXOPTS) '$<' >>$@.log
416-
@echo [PDF]: \(4/4\) pdflatex $<
417-
@echo [PDF]: see '[email protected]' for a full report of the pdf build process.
430+
@echo [pdf]: \(4/4\) pdflatex $<
431+
@echo [pdf]: see '[email protected]' for a full report of the pdf build process.
432+
@echo [pdf]: pdf compilation complete at `date`.
418433

419434
##########################################################################
420435
#

0 commit comments

Comments
 (0)