| 1 |
|
| 2 |
SRCDIR=typogrid |
| 3 |
INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/typogrid |
| 4 |
DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/typogrid |
| 5 |
VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'` |
| 6 |
|
| 7 |
|
| 8 |
.SUFFIXES: .sty .ins .dtx .pdf .ps .pdf |
| 9 |
|
| 10 |
.ins.sty: |
| 11 |
pdflatex $< |
| 12 |
|
| 13 |
.dtx.pdf: |
| 14 |
pdflatex $< |
| 15 |
pdflatex $< |
| 16 |
makeindex -s gind.ist $(*D)/$(*F) |
| 17 |
makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo |
| 18 |
pdflatex $< |
| 19 |
|
| 20 |
all: typogrid.sty typogrid.pdf |
| 21 |
|
| 22 |
|
| 23 |
clean: |
| 24 |
@-rm -f typogrid.glo typogrid.gls typogrid.idx typogrid.ilg |
| 25 |
@-rm -f typogrid.ind typogrid.aux typogrid.log typogrid.toc |
| 26 |
@-rm -f testtypogrid.aux testtypogrid.log |
| 27 |
@-rm -f *~ |
| 28 |
|
| 29 |
distclean: clean |
| 30 |
@-rm -f typogrid.sty typogrid.pdf |
| 31 |
@-rm -f testtypogrid.pdf |
| 32 |
|
| 33 |
tar: all clean |
| 34 |
-rm -f typogrid-$(VERSION).tar.gz |
| 35 |
tar czCf .. typogrid-$(VERSION).tar.gz \ |
| 36 |
$(SRCDIR)/README \ |
| 37 |
$(SRCDIR)/ChangeLog \ |
| 38 |
$(SRCDIR)/Makefile \ |
| 39 |
$(SRCDIR)/typogrid.dtx \ |
| 40 |
$(SRCDIR)/typogrid.ins \ |
| 41 |
$(SRCDIR)/typogrid.pdf \ |
| 42 |
$(SRCDIR)/getversion.tex \ |
| 43 |
$(SRCDIR)/testtypogrid.tex |
| 44 |
rm -f getversion.log |
| 45 |
|
| 46 |
zip: all clean |
| 47 |
-@rm -f typogrid-$(VERSION).zip |
| 48 |
mkdirhier tex/latex/typogrid |
| 49 |
mkdirhier doc/latex/typogrid |
| 50 |
mkdirhier source/latex/typogrid |
| 51 |
mv typogrid.sty tex/latex/typogrid |
| 52 |
cp typogrid.dtx typogrid.ins typogrid.xml source/latex/typogrid |
| 53 |
cp Makefile source/latex/typogrid |
| 54 |
cp README ChangeLog typogrid.pdf testtypogrid.tex doc/latex/typogrid |
| 55 |
zip -r typogrid-$(VERSION).zip tex doc source |
| 56 |
rm -r tex/ doc/ source/ |
| 57 |
rm -f getversion.log |
| 58 |
|
| 59 |
install: all |
| 60 |
if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi |
| 61 |
if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi |
| 62 |
install -m644 typogrid.sty $(INSTALLDIR) |
| 63 |
install -m644 typogrid.pdf $(DOCDIR) |
| 64 |
texhash |
| 65 |
|
| 66 |
|
| 67 |
typogrid.sty: typogrid.ins typogrid.dtx |
| 68 |
|