Debian Codegraph @

texmf-dist/doc/latex/ryethesis/Makefile

raw
1 FILEROOT=ryesample
2
3 SHELL=/bin/sh
4
5 VERSION=$(shell grep changes ryethesis.dtx | perl -wlne 'print $$1 if /v([0-9]+\.[0-9]+)/' | sort -n | tail -1)
6
7 LATEX=pdflatex
8
9 TEXFILES=ryesample.tex
10 BIBFILES=ryesample.bib
11 FIGS=figure1.pdf
12 FILES=README ryethesis.ins ryethesis.dtx ryethesis.pdf ryesample.pdf Makefile
13 EXTRACLEAN=*.aux *.lof *.lot *.loa *.log *.bbl *.blg *.ind *.ilg *.toc *.idx *.gls *.glo *.out *~ *.nls *.nlo *.ist *.toa *.glg *.acn *.acr *.alg *.fdb_latexmk *.synctex.gz *.dvi auto ryethesis-*.zip
14
15 TEXMFFLAGS=-file-line-error -halt-on-error #-interaction=batchmode
16
17 TARGETS=ryethesis.cls ryethesis.pdf ryesample.pdf ryethesis-$(VERSION).zip
18
19 all: $(TARGETS)
20
21 .PHONY: again.and.again once bibtex glossary index nomenclature
22
23 once:
24 @$(LATEX) $(TEXMFFLAGS) $(FILEROOT) || (rm -f $(FILEROOT).pdf; exit 2);
25
26 bibtex:
27 @bibtex -terse $(FILEROOT)
28
29 glossary:
30 @if [ -f $(FILEROOT).ist ]; then makeglossaries -q $(FILEROOT) ; fi
31
32 index:
33 @if [ -f $(FILEROOT).idx ]; then makeindex -q $(FILEROOT) ; fi
34
35 nomenclature:
36 @if [ -f $(FILEROOT).nlo ]; then makeindex -q $(FILEROOT).nlo -s nomencl.ist -o $(FILEROOT).nls; fi
37
38 again.and.again:
39 @if [ $(MAKELEVEL) = 4 ]; then \
40 echo "Too many nesting levels of make!"; exit 1; \
41 fi
42 $(MAKE) once
43 @if `grep -q -e "There were undefined references" -e "There were multiply-defined labels" -e "Label(s) may have changed. Rerun to get cross-references right" $(FILEROOT).log`; \
44 then $(MAKE) again.and.again; \
45 fi
46
47 clean:
48 @rm -rf $(EXTRACLEAN)
49
50 clean-all:
51 @make clean;
52 @rm -rf $(TARGETS)
53
54 $(FILEROOT).pdf: Makefile ryethesis.cls ${TEXFILES} ${BIBFILES} ${FIGS}
55 @$(MAKE) once
56 @$(MAKE) bibtex
57 @$(MAKE) glossary
58 @$(MAKE) index
59 @$(MAKE) nomenclature
60 @$(MAKE) again.and.again
61
62 ryethesis.pdf: Makefile ryethesis.dtx
63 echo "Making "$@
64 @$(LATEX) $(TEXMFFLAGS) ryethesis.dtx || ( cat ryethesis.log; exit 1 )
65 @$(LATEX) $(TEXMFFLAGS) ryethesis.dtx || ( cat ryethesis.log; exit 2 )
66
67 ryethesis.cls: Makefile ryethesis.ins ryethesis.dtx
68 echo "Making "$@
69 @$(LATEX) $(TEXMFFLAGS) ryethesis.ins || ( cat ryethesis.log; exit 1 )
70
71 ryethesis-$(VERSION).zip: ${FILES} ${TEXFILES} ${BIBFILES} ${FIGS}
72 @rm -f ryethesis-*.zip; rm -rf ./ryethesis; mkdir ryethesis; cp $^ ryethesis; zip $@ ryethesis/*; rm -rf ./ryethesis;
73