summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/typogrid/Makefile
blob: 6f6cfa0a53dfff0dcf108f15fba5573356d2b107 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

SRCDIR=typogrid
INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/typogrid
DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/typogrid
VERSION=`grep '^\\\\def\\\\fileversion' typogrid.dtx | sed 's/^\\\\def\\\\fileversion{\\(.*\\)\\.\\(.*\\)}/\\1_\\2/'`


.SUFFIXES: .sty .ins .dtx .dvi .ps .pdf

.ins.sty:
	latex $<

.dtx.dvi:
	latex $<
	latex $<
	makeindex -s gind.ist $(*D)/$(*F)
	makeindex -s gglo.ist -o $(*D)/$(*F).gls $(*D)/$(*F).glo
	latex $<

.dvi.ps:
	dvips -o $(*D)/$(*F).ps $(*D)/$(*F)


all: typogrid.sty typogrid.dvi


clean:
	@-rm -f typogrid.glo typogrid.gls typogrid.idx typogrid.ilg
	@-rm -f typogrid.ind typogrid.aux typogrid.log typogrid.toc
	@-rm -f testtypogrid.aux testtypogrid.log
	@-rm -f *~

distclean: clean
	@-rm -f typogrid.sty typogrid.dvi
	@-rm -f testtypogrid.dvi

tar:	all clean
	echo Lege typogrid-$(VERSION).tar.gz an
	-rm -f typogrid-$(VERSION).tar.gz
	tar czCf .. typogrid-$(VERSION).tar.gz \
	  $(SRCDIR)/README \
	  $(SRCDIR)/Makefile \
	  $(SRCDIR)/typogrid.dtx \
	  $(SRCDIR)/typogrid.ins \
	  $(SRCDIR)/typogrid.dvi \
	  $(SRCDIR)/testtypogrid.tex

zip:	all clean
	-@rm -f typogrid-$(VERSION).zip
	mkdirhier tex/latex/typogrid
	mkdirhier doc/latex/typogrid
	mkdirhier source/latex/typogrid
	mv typogrid.sty tex/latex/typogrid
	cp typogrid.dtx typogrid.ins typogrid.xml source/latex/typogrid
	cp Makefile source/latex/typogrid
	cp README typogrid.dvi testtypogrid.tex doc/latex/typogrid
	zip -r typogrid-$(VERSION).zip tex doc source
	rm -r tex/ doc/ source/

install: all
	if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi
	if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi
	install -m644 typogrid.sty $(INSTALLDIR)
	install -m644 typogrid.dvi $(DOCDIR)
	texhash


typogrid.sty: typogrid.ins typogrid.dtx