Debian Codegraph @

texmf-dist/source/latex/erdc/Makefile

raw
1 #
2 # Makefile for erdc package
3 #
4 # This file is in public domain
5 #
6 # $Id: Makefile,v 1.5 2009-07-02 16:11:45 boris Exp $
7 #
8
9 PACKAGE=erdc
10
11 SAMPLES = sample.tex
12
13 IMAGES = \
14 red_corps_castle2.eps\
15 nola.eps
16
17 PDFIMAGES = ${IMAGES:%.eps=%.pdf}
18
19 PDF = $(PACKAGE).pdf ${SAMPLES:%.tex=%.pdf}
20
21 WD = $(shell pwd)
22 CURRDIR = $(notdir ${WD})
23
24
25 all: ${PDF} ${PDFIMAGES}
26
27
28 %.pdf: %.dtx $(PACKAGE).cls ${PDFIMAGES}
29 pdflatex $<
30 - bibtex $*
31 pdflatex $<
32 - makeindex -s gind.ist -o $*.ind $*.idx
33 - makeindex -s gglo.ist -o $*.gls $*.glo
34 pdflatex $<
35 while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
36 do pdflatex $<; done
37
38
39 %.cls: %.ins %.dtx
40 pdflatex $<
41
42 %.pdf: %.tex $(PACKAGE).cls
43 pdflatex $<
44 - bibtex $*
45 pdflatex $<
46 pdflatex $<
47 while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
48 do pdflatex $<; done
49
50
51 %.pdf: %.eps
52 epstopdf $<
53
54
55 .PRECIOUS: $(PACKAGE).cfg $(PACKAGE).cls
56
57
58 clean:
59 $(RM) $(PACKAGE).cls *.log *.aux \
60 *.glo *.idx *.toc *.tbc \
61 *.ilg *.ind *.out *.lof \
62 *.lot *.bbl *.blg *.gls *.sty *.ist \
63 *.dvi *.ps *.thm *.tgz *.zip
64
65 distclean: clean
66 $(RM) $(PDF) $(PDFIMAGES)
67
68 #
69 # Archive for the distribution. Includes typeset documentation
70 #
71 archive: all clean
72 cd ..; \
73 tar -czvf $(PACKAGE).tgz --exclude 'debug*' \
74 --exclude '*~' --exclude '*.tgz' --exclude '*.zip' \
75 --exclude CVS $(CURRDIR); \
76 mv $(PACKAGE).tgz $(CURRDIR); \
77 cd $(CURRDIR)
78
79
80 zip: all clean
81 cd ..; \
82 zip -r $(PACKAGE).zip $(CURRDIR) \
83 -x 'debug*' -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x 'CVS/*'; \
84 mv $(PACKAGE).zip $(CURRDIR); \
85 cd $(CURRDIR)