@@ -188,54 +188,69 @@ dist:
188188 mkdir -p dist
189189
190190 # archive the HTML
191- make html
191+ @echo "Building HTML..."
192+ $(MAKE) html
192193 cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
193194 tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
194195 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-html.tar
195196 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-html.zip python-$(DISTVERSION)-docs-html)
196197 rm -r dist/python-$(DISTVERSION)-docs-html
197198 rm dist/python-$(DISTVERSION)-docs-html.tar
199+ @echo "Build finished and archived!"
198200
199201 # archive the text build
200- make text
202+ @echo "Building text..."
203+ $(MAKE) text
201204 cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
202205 tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
203206 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-text.tar
204207 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-text.zip python-$(DISTVERSION)-docs-text)
205208 rm -r dist/python-$(DISTVERSION)-docs-text
206209 rm dist/python-$(DISTVERSION)-docs-text.tar
210+ @echo "Build finished and archived!"
207211
208212 # archive the A4 latex
213+ @echo "Building LaTeX (A4 paper)..."
209214 rm -rf build/latex
210- make latex PAPER=a4
211- -sed -i 's/makeindex/makeindex -q/' build/latex/Makefile
212- (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
215+ $(MAKE) latex PAPER=a4
216+ # remove zip & bz2 dependency on all-pdf,
217+ # as otherwise the full latexmk process is run twice.
218+ # ($$ is needed to escape the $; https://www.gnu.org/software/make/manual/make.html#Basics-of-Variable-References)
219+ -sed -i 's/: all-$$(FMT)/:/' build/latex/Makefile
220+ (cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$((`nproc`+1)) --output-sync LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2)
213221 cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
214222 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
223+ @echo "Build finished and archived!"
215224
216225 # archive the letter latex
226+ @echo "Building LaTeX (US paper)..."
217227 rm -rf build/latex
218- make latex PAPER=letter
219- -sed -i 's/makeindex/makeindex -q /' build/latex/Makefile
220- (cd build/latex; make clean && make all-pdf && make FMT=pdf zip bz2)
228+ $(MAKE) latex PAPER=letter
229+ -sed -i 's/: all-$$(FMT)/: /' build/latex/Makefile
230+ (cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$((`nproc`+1)) --output-sync LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2)
221231 cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-letter.zip
222232 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-letter.tar.bz2
233+ @echo "Build finished and archived!"
223234
224235 # copy the epub build
236+ @echo "Building EPUB..."
225237 rm -rf build/epub
226- make epub
238+ $(MAKE) epub
227239 cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
240+ @echo "Build finished and archived!"
228241
229242 # archive the texinfo build
243+ @echo "Building Texinfo..."
230244 rm -rf build/texinfo
231- make texinfo
232- make info --directory=build/texinfo
245+ $(MAKE) texinfo
246+ $(MAKE) info --directory=build/texinfo
233247 cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo
234248 tar -C dist -cf dist/python-$(DISTVERSION)-docs-texinfo.tar python-$(DISTVERSION)-docs-texinfo
235249 bzip2 -9 -k dist/python-$(DISTVERSION)-docs-texinfo.tar
236250 (cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-texinfo.zip python-$(DISTVERSION)-docs-texinfo)
237251 rm -r dist/python-$(DISTVERSION)-docs-texinfo
238252 rm dist/python-$(DISTVERSION)-docs-texinfo.tar
253+ @echo "Build finished and archived!"
239254
240255.PHONY : _ensure-package
241256_ensure-package : venv
@@ -247,11 +262,11 @@ _ensure-package: venv
247262
248263.PHONY : _ensure-pre-commit
249264_ensure-pre-commit :
250- make _ensure-package PACKAGE=pre-commit
265+ $( MAKE ) _ensure-package PACKAGE=pre-commit
251266
252267.PHONY : _ensure-sphinx-autobuild
253268_ensure-sphinx-autobuild :
254- make _ensure-package PACKAGE=sphinx-autobuild
269+ $( MAKE ) _ensure-package PACKAGE=sphinx-autobuild
255270
256271.PHONY : check
257272check : _ensure-pre-commit
@@ -271,12 +286,12 @@ serve:
271286# for development releases: always build
272287.PHONY : autobuild-dev
273288autobuild-dev :
274- make dist SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1'
289+ $( MAKE ) dist SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1'
275290
276291# for quick rebuilds (HTML only)
277292.PHONY : autobuild-dev-html
278293autobuild-dev-html :
279- make html SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1'
294+ $( MAKE ) html SPHINXOPTS=' $(SPHINXOPTS) -Ea -A daily=1'
280295
281296# for stable releases: only build if not in pre-release stage (alpha, beta)
282297# release candidate downloads are okay, since the stable tree can be in that stage
@@ -286,12 +301,12 @@ autobuild-stable:
286301 echo " Not building; $( DISTVERSION) is not a release version." ; \
287302 exit 1;; \
288303 esac
289- @make autobuild-dev
304+ @$( MAKE ) autobuild-dev
290305
291306.PHONY : autobuild-stable-html
292307autobuild-stable-html :
293308 @case $(DISTVERSION ) in * [ab]* ) \
294309 echo " Not building; $( DISTVERSION) is not a release version." ; \
295310 exit 1;; \
296311 esac
297- @make autobuild-dev-html
312+ @$( MAKE ) autobuild-dev-html
0 commit comments