summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/isodate/Makefile
blob: 760d4488983f6e219ed7878408e5402e47a5cc99 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
SRCDIR=isodate
INSTALLDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/tex/latex/isodate
DOCDIR=`kpsewhich --expand-path='$$TEXMFLOCAL'`/doc/latex/isodate
VERSION=`latex getversion | grep '^VERSION' | sed 's/^VERSION \\(.*\\)\\.\\(.*\\)/\\1_\\2/'`

.SUFFIXES: .sty .ins .dtx .pdf

LANG= danish.idf english.idf french.idf german.idf norsk.idf swedish.idf

.ins.sty:
	latex $<

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

all: isodate isodate.pdf isodateo.pdf testdate.pdf

isodate.sty: isodate.ins isodate.dtx

testdate.pdf: testdate.tex isodate.sty
	pdflatex testdate

isodate: isodate.sty $(LANG)


danish.idf: isodate.ins
	latex isodate.ins
english.idf: isodate.ins
	latex isodate.ins
french.idf: isodate.ins
	latex isodate.ins
german.idf: isodate.ins
	latex isodate.ins
swedish.idf: isodate.ins
	latex isodate.ins

substr:
	@if [ -z `kpsewhich substr.sty` ]; then \
	echo; echo "Error installing isodate:"; \
	echo "This version of isodate needs the package substr.sty"; \
	echo "which cannot be found in your system."; \
	echo; \
	echo "Please download it from CTAN:/macros/latex/contrib/substr/."; \
	echo "One of the possible CTAN nodes is ftp.dante.de."; \
	echo "Try to execute make after installing substr.sty again."; \
	echo; exit; fi


clean:
	@-rm -f isodate.{glo,gls,idx,ilg,ind,aux,log,toc}
	@-rm -f isodateo.{glo,gls,idx,ilg,ind,aux,log,toc}
	@-rm -f testdate.{log,aux}
	@-rm -f *~

distclean: clean
	@-rm -f $(LANG)
	@-rm -f isodate.sty isodate.pdf
	@-rm -f isodateo.sty isodateo.pdf
	@-rm -f testdate.pdf

tar:	all clean
	echo Lege isodate-$(VERSION).tar.gz an
	-rm -f isodate-$(VERSION).tar.gz
	tar czhCf .. isodate-$(VERSION).tar.gz \
	  isodate/README isodate/ChangeLog isodate/Makefile \
	  isodate/isodate.{dtx,ins,pdf} \
	  isodate/isodateo.{dtx,pdf} \
	  isodate/testdate.{pdf,tex} \
	  isodate/getversion.tex \
	  isodate/testisodate_without_babel.tex \
	  isodate/isodate.xml
	rm -f getversion.log

texlive: all clean
	rm -rf texmf
	mkdir -p texmf/tex/latex/isodate
	mkdir -p texmf/doc/latex/isodate
	mkdir -p texmf/source/latex/isodate
	cp isodate.sty isodateo.sty *.idf texmf/tex/latex/isodate/
	cp isodate.pdf README ChangeLog isodate.xml texmf/doc/latex/isodate/
	cp isodate.dtx isodate.ins Makefile texmf/source/latex/isodate/
	cp isodateo.dtx texmf/source/latex/isodate/

install: all
	if [ ! -d $(INSTALLDIR) ]; then mkdirhier $(INSTALLDIR); fi
	if [ ! -d $(DOCDIR) ]; then mkdirhier $(DOCDIR); fi
	install -m644 *.sty *.idf $(INSTALLDIR)
	install -m644 isodate.pdf README ChangeLog $(DOCDIR)
	texhash