TEXS = $(wildcard *.tex) MAIN = sample-use-sty .SILENT: distrib all all: $(MAIN).pdf software-biblatex.pdf biblatex-styles: stublist mkbiblatexstubs.sh bash mkbiblatexstubs.sh < stublist biblio.bib: ../swentry.org ../bin/extract-bibtex.pl < $< > $@ swentries.tex: ../swentry.org ../bin/export-org-to-latex $< ../bin/extract-entries.pl < ../swentry.tex > $@ software-biblatex.pdf: software-biblatex.tex swentries.tex history.tex biblio.bib manual.bib pdflatex software-biblatex.tex bibtex software-biblatex pdflatex software-biblatex.tex pdflatex software-biblatex.tex sample-use-sty.pdf: biblio.bib history.tex: git for-each-ref --format="\begin{release}{%(refname:short)}{%(taggerdate:short)} \item %(subject) \end{release}" refs/tags | grep bltx | tac > history.tex 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 $< else rubber -m pdftex $< endif 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 # 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 *~ %/clean: if [ -f $* ]; then rubber -m pdftex --clean $* ; fi distclean: clean