[commit: ghc] wip/merge-queue: make: Silence some xelatex output (3a509d2)

git at git.haskell.org git at git.haskell.org
Sun Jan 6 12:33:30 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/merge-queue
Link       : http://ghc.haskell.org/trac/ghc/changeset/3a509d2999d499793075b47d1fb7380c9e896ea1/ghc

>---------------------------------------------------------------

commit 3a509d2999d499793075b47d1fb7380c9e896ea1
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sun Dec 30 16:36:21 2018 -0500

    make: Silence some xelatex output
    
    Currently build logs from GitLab CI around around 7 megabytes each. Of this,
    around 2 megabytes is latex output. This is quite silly as essentially all of
    this output is unresolved references in the early latex iterations.
    Here we silence this output.
    
    However, to make sure that we don't silence errors we allow each xelatex
    invocation besides the last to fail.


>---------------------------------------------------------------

3a509d2999d499793075b47d1fb7380c9e896ea1
 rules/sphinx.mk | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/rules/sphinx.mk b/rules/sphinx.mk
index 4929f3c..32ef3e4 100644
--- a/rules/sphinx.mk
+++ b/rules/sphinx.mk
@@ -56,13 +56,18 @@ pdf_$1 : $1/$2.pdf
 pdf : pdf_$1
 
 ifneq "$$(BINDIST)" "YES"
+# N.B. If we don't redirect latex output to /dev/null then we end up with literally
+# 30% of the build output being warnings, even in a successful build. However,
+# to make sure that we don't silence errors we allow each xelatex invocation
+# besides the last to fail.
+
 $1/$2.pdf: $1/conf.py $$($1_RST_SOURCES)
 	$(SPHINXBUILD) -b latex -d $1/.doctrees-pdf $(SPHINXOPTS) $1 $1/build-pdf/$2
-	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex
-	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex
-	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex
+	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true
+	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true
+	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true
 	cd $1/build-pdf/$2 ; makeindex $2.idx
-	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex
+	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex 2>/dev/null >/dev/null || true
 	cd $1/build-pdf/$2 ; xelatex -halt-on-error $2.tex
 	cp $1/build-pdf/$2/$2.pdf $1/$2.pdf
 endif



More information about the ghc-commits mailing list