summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/hhtensor/Makefile
blob: a6a521b28ac3f95ee540027966cfcfba39502737 (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
70
71
72

SRCDIR=hhtensor
INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/hhtensor
DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/hhtensor
VERSION=`grep '^\\\\def\\\\fileversion' hhtensor.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 $<


all: hhtensor hhtensor.dvi 

hhtensor: hhtensor.sty

hhtensor.dvi: hhtensor.dtx hhtensor.ins
	latex hhtensor.dtx
	latex hhtensor.dtx
	makeindex -s gind.ist hhtensor
	makeindex -s gglo.ist -o hhtensor.gls hhtensor.glo
	latex hhtensor.dtx

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

distclean: clean
	@-rm -f hhtensor.sty hhtensor.dvi

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

zip:	all clean
	-@rm -f hhtensor-$(VERSION).zip
	mkdirhier tex/latex/hhtensor
	mkdirhier doc/latex/hhtensor
	mkdirhier source/latex/hhtensor
	mv hhtensor.sty tex/latex/hhtensor
	cp hhtensor.dtx hhtensor.ins hhtensor.xml source/latex/hhtensor
	cp Makefile source/latex/hhtensor
	cp README hhtensor.dvi doc/latex/hhtensor
	zip -r hhtensor-$(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 hhtensor.sty $(INSTALLDIR)
	install -m644 hhtensor.dvi $(DOCDIR)
	texhash


hhtensor.sty: hhtensor.ins hhtensor.dtx