summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-software/Makefile
blob: 183640b0506fd87c264cb2ac6c7c6833d2958986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 0; 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