summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/hhtensor/Makefile
blob: 2c4daf366fd36095f68052243bf03c27764d1acb (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
73
74
75
76

SRCDIR=hhtensor
INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/hhtensor
DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/hhtensor
VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'`


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

.ins.sty:
	pdflatex $<

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


all: hhtensor hhtensor.pdf

hhtensor: hhtensor.sty

hhtensor.pdf: hhtensor.dtx hhtensor.ins
	pdflatex hhtensor.dtx
	pdflatex hhtensor.dtx
	makeindex -s gind.ist hhtensor
	makeindex -s gglo.ist -o hhtensor.gls hhtensor.glo
	pdflatex 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.pdf

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)/ChangeLog \
	  $(SRCDIR)/Makefile \
	  $(SRCDIR)/hhtensor.pdf \
	  $(SRCDIR)/hhtensor.dtx \
	  $(SRCDIR)/hhtensor.ins \
	  $(SRCDIR)/getversion.tex \
	  $(SRCDIR)/hhtensor.xml
	rm getversion.log

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.pdf doc/latex/hhtensor
	zip -r hhtensor-$(VERSION).zip tex doc source
	rm -r tex/ doc/ source/
	rm getversion.log

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


hhtensor.sty: hhtensor.ins hhtensor.dtx