| 1 |
VERSION=`grep -e '\\[.*\\]' onlyamsmath-v.tex | sed 's/ \\[[0-9/]* *\\([v0-9]*\\)\\.\\([0-9]*\\).*\\]/\\1_\\2/'` |
| 2 |
|
| 3 |
.SUFFIXES: .sty .ins .dtx .pdf |
| 4 |
|
| 5 |
|
| 6 |
.ins.sty: |
| 7 |
pdflatex $< |
| 8 |
|
| 9 |
.dtx.pdf: |
| 10 |
pdflatex $< |
| 11 |
pdflatex $< |
| 12 |
makeindex -s gind.ist $(*D)/$(*F) |
| 13 |
makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo |
| 14 |
pdflatex $< |
| 15 |
|
| 16 |
all: onlyamsmath onlyamsmath.pdf message |
| 17 |
|
| 18 |
onlyamsmathtest.pdf: |
| 19 |
pdflatex onlyamsmathtest |
| 20 |
|
| 21 |
|
| 22 |
onlyamsmath: |
| 23 |
pdflatex onlyamsmath.ins |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
clean: |
| 28 |
@-rm -f onlyamsmath.{glo,gls,idx,ilg,ind,aux,log,toc} |
| 29 |
@-rm -f onlyamsmathtest.{log,aux} |
| 30 |
@-rm -f *~ |
| 31 |
|
| 32 |
distclean: clean |
| 33 |
@-rm -f onlyamsmath.{sty,pdf,ps} |
| 34 |
@-rm -f onlyamsmathtest.{pdf,ps} |
| 35 |
|
| 36 |
tar: all clean |
| 37 |
@echo Generate onlyamsmath-$(VERSION).tar.gz |
| 38 |
@-rm -f onlyamsmath-$(VERSION).tar.gz |
| 39 |
@tar czCf .. onlyamsmath-$(VERSION).tar.gz \ |
| 40 |
onlyamsmath/README \ |
| 41 |
onlyamsmath/ChangeLog \ |
| 42 |
onlyamsmath/Makefile \ |
| 43 |
onlyamsmath/onlyamsmath.{dtx,ins,pdf} \ |
| 44 |
onlyamsmath/onlyamsmathtest.tex |
| 45 |
|
| 46 |
zip: all clean |
| 47 |
@echo Generate onlyamsmath-$(VERSION).zip |
| 48 |
mkdir -p tex/latex/onlyamsmath |
| 49 |
mkdir -p doc/latex/onlyamsmath |
| 50 |
mkdir -p source/latex/onlyamsmath |
| 51 |
cp onlyamsmath.sty tex/latex/onlyamsmath |
| 52 |
cp README ChangeLog onlyamsmath.pdf onlyamsmathtest.tex doc/latex/onlyamsmath |
| 53 |
cp onlyamsmath.dtx onlyamsmath.ins Makefile source/latex/onlyamsmath |
| 54 |
@rm -f onlyamsmath-$(VERSION).zip |
| 55 |
@zip -r onlyamsmath-$(VERSION).zip source/ tex/ doc/ |
| 56 |
rm -rf source/ tex/ doc/ |
| 57 |
|
| 58 |
message: |
| 59 |
@echo "Please copy onlyamsmath.sty to a directory" |
| 60 |
@echo "in the LaTeX search path" |
| 61 |
@echo "Then run \`latex onlyamsmathtest' to see an example" |
| 62 |
|
| 63 |
|