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