Skip to content

Commit 647cf81

Browse files
committed
Refactor code to eliminate duplication
1 parent f875ad9 commit 647cf81

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Doc/Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,8 @@ dist-pdf:
241241
# as otherwise the full latexmk process is run twice.
242242
# ($$ is needed to escape the $; https://www.gnu.org/software/make/manual/make.html#Basics-of-Variable-References)
243243
-sed -i 's/: all-$$(FMT)/:/' build/latex/Makefile
244-
if [ -n "$(filter output-sync,$(value .FEATURES))" ]; then \
245-
(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`getconf _NPROCESSORS_ONLN`+1)) --output-sync LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2) \
246-
else \
247-
(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`getconf _NPROCESSORS_ONLN`+1)) LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2) \
248-
fi
244+
if [ -n "$(filter output-sync,$(value .FEATURES))" ]; then OUTPUTSYNC=--output-sync; else OUTPUTSYNC=; fi && \
245+
(cd build/latex; $(MAKE) clean && $(MAKE) --jobs=$$((`getconf _NPROCESSORS_ONLN`+1)) $$OUTPUTSYNC LATEXMKOPTS='-quiet' all-pdf && $(MAKE) FMT=pdf zip bz2)
249246
cp build/latex/docs-pdf.zip dist/python-$(DISTVERSION)-docs-pdf-a4.zip
250247
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
251248
@echo "Build finished and archived!"

0 commit comments

Comments
 (0)