From d050f05231b12ad0f2748819fd688f618963fdb0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 2 Aug 2022 20:47:24 +0000 Subject: biblatex-software (2aug22) git-svn-id: svn://tug.org/texlive/trunk@64030 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/biblatex-software/Makefile | 59 ++++++++++++++++------ 1 file changed, 44 insertions(+), 15 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/latex/biblatex-software/Makefile b/Master/texmf-dist/source/latex/biblatex-software/Makefile index 1b75b6374df..5d80961ef20 100644 --- a/Master/texmf-dist/source/latex/biblatex-software/Makefile +++ b/Master/texmf-dist/source/latex/biblatex-software/Makefile @@ -17,18 +17,24 @@ swentries.tex: ../swentry.org ../bin/extract-entries.pl < ../swentry.tex > $@ software-biblatex.pdf: software-biblatex.tex swentries.tex history.tex biblio.bib manual.bib - pdflatex software-biblatex.tex + pdflatex software-biblatex.tex > /dev/null bibtex software-biblatex - pdflatex software-biblatex.tex - pdflatex software-biblatex.tex + pdflatex software-biblatex.tex > /dev/null + pdflatex software-biblatex.tex > /dev/null -sample-use-sty.pdf: biblio.bib sample-content.tex +sample-use-sty.pdf: biblio.bib sample-content.tex sample-use-sty.tex -sample-use-sty.backref.pdf: biblio.bib biblio.bib sample-content.tex +sample-use-sty.nohyperref.tex: sample-use-sty.tex + grep -v hyperref $< > $@ + +sample-use-sty.nohyperref.pdf: biblio.bib sample-content.tex sample-use-sty.nohyperref.tex + +sample-use-sty.backref.pdf: biblio.bib sample-content.tex # test that backrefs work - pdflatex "\PassOptionsToPackage{backref=true}{biblatex} \input{sample-use-sty.backref.tex}" - biber sample-use-sty.backref - pdflatex "\PassOptionsToPackage{backref=true}{biblatex} \input{sample-use-sty.backref.tex}" + pdflatex -jobname sample-use-sty.backref "\PassOptionsToPackage{backref=true}{biblatex} \input{sample-use-sty.tex}" > /dev/null + biber sample-use-sty.backref > /dev/null + pdflatex -jobname sample-use-sty.backref "\PassOptionsToPackage{backref=true}{biblatex} \input{sample-use-sty.tex}" > /dev/null + pdflatex -jobname sample-use-sty.backref "\PassOptionsToPackage{backref=true}{biblatex} \input{sample-use-sty.tex}" > /dev/null history.tex: git for-each-ref --format="\begin{release}{%(refname:short)}{%(taggerdate:short)} \item %(subject) \end{release}" refs/tags | grep bltx | tac > history.tex @@ -38,25 +44,48 @@ sample.tex : biblio.bib biblatex-styles %.pdf: %.tex ifeq (, $(shell PATH=$(PATH) which rubber)) echo "No rubber in $(PATH), falling back to basic pdflatex calls" - pdflatex $< - biber $* - pdflatex $< + pdflatex $< > /dev/null + biber $* > /dev/null + pdflatex $< > /dev/null + pdflatex $< > /dev/null else rubber -m pdftex $< endif +%.txt: %.pdf + pdftotext $< + +test: sample-use-sty.txt sample-use-sty.nohyperref.txt sample-use-sty.backref.txt + # check that we get the same results with and without hyperref + echo -n "Testing hyperref vs nohyperref: " + (diff sample-use-sty.txt sample-use-sty.nohyperref.txt > /dev/null; if [ $$? -ne 0 ]; then echo "FAIL"; else echo "SUCCESS"; fi) + # check that backrefs work + echo -n "Testing presence of backrefs: " + (grep "cited on page" sample-use-sty.backref.txt > /dev/null; if [ $$? -ne 0 ]; then echo "FAIL"; else echo "SUCCESS"; fi) distrib: # remind maintainer to update version number in the documentation - echo -n "Did you update the version number in software-biblatex.tex? [y/N]" - read ans; if [ ".$$ans" != ".y" ]; then echo "Please update it and run make distrib again"; exit 1; fi + echo -n "Updated version number in software-biblatex.tex, date strings in software.* ? [y/N]" + read ans; if [ ".$$ans" != ".y" ]; then echo "Please update this information and run make distrib again"; exit 1; fi # update history rm history.tex make software-biblatex.pdf tar --transform 's,^\(.\),biblatex-software/\1,' -czhvf biblatex-software.tar.gz `git ls-files` -clean: $(patsubst %,%/clean,$(TEXS)) - rm -f *+sw.bbx *+sw.dbx *+sw.cbx *+sw.lbx *~ +.PHONY: preserve restore clean distclean + +clean: + # preserve PDF files under version control + mkdir -p .save + mv `git ls-files | grep pdf` .save + # clean up the rest + make cleaninner + # restore PDF files under version control + mv .save/*.pdf . + rmdir .save + +cleaninner: $(patsubst %,%/clean,$(TEXS)) + rm -f *+sw.bbx *+sw.dbx *+sw.cbx *+sw.lbx *~ *.txt sample-use-sty.backref.* sample-use-sty.nohyperref.* %/clean: if [ -f $* ]; then rubber -m pdftex --clean $* ; fi -- cgit v1.2.3