summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/greek-fontenc/Makefile
blob: a784a805804a9ffa0f450ad1c14b93582b65c11d (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# This Makefile updates the source and documentation for the
# greek-fontenc LateX package
#
# © 2019 Günter Milde
# 
# SRCDIR (and the other variables) can be easily modified as parameters
# while calling `make', e.g.
#
#   make install SRCDIR=~/texmf/tex/latex/

# Global variables
# =================

# for installation into a users local texmf tree
DESTDIR = ~/texmf/tex/latex/greek/greek-fontenc
DOCDIR = ~/texmf/doc/latex/greek/greek-fontenc

CHDIR = cd
COPY = cp -u
SH = sh

# programs
PYLIT = pylit         # text <-> source converter for literal programming
RST2HTML = rst2html5  # text -> HTML converter, see docutils.sf.net
RUBBER = rubber -f    # wrapper around `latex`, run until references resolved
LATEX = pdflatex -interaction batchmode

# LaTeX source files
# ==================

.PHONY: all font-encodings packages

all: font-encodings packages

# font encoding definition files
font-encodings: greek-fontenc.def lgrenc.def tuenc-greek.def greek-euenc.def 

tuenc-greek.def: tuenc-greek.def.txt
	$(PYLIT) $@.txt

greek-fontenc.def: greek-fontenc.def.txt
	$(PYLIT) $@.txt

lgrenc.def: lgrenc.def.txt
	$(PYLIT) $@.txt

# LaTeX packages
packages: textalpha.sty alphabeta.sty alphabeta-tuenc.def alphabeta-lgr.def

textalpha.sty: textalpha.sty.txt
	$(PYLIT) $@.txt

alphabeta.sty: alphabeta.sty.txt
	$(PYLIT) $@.txt

alphabeta-tuenc.def: alphabeta-tuenc.def.txt
	$(PYLIT) $@.txt

alphabeta-lgr.def: alphabeta-lgr.def.txt
	$(PYLIT) $@.txt

# Experimental files
lgr2licr.lua: lgr2licr.lua.txt
	$(PYLIT) $@.txt

# Documentation
# =============

.PHONY: doc html pdf

doc: html pdf


html: README.html tuenc-greek.def.html greek-fontenc.def.html lgrenc.def.html \
     textalpha.sty.html alphabeta.sty.html \
     alphabeta-tuenc.def.html alphabeta-lgr.def.html lgr2licr.lua.html

README.html: README
	$(RST2HTML) README README.html

tuenc-greek.def.html: tuenc-greek.def
	$(PYLIT) tuenc-greek.def
	$(RST2HTML) tuenc-greek.def.txt tuenc-greek.def.html

greek-fontenc.def.html: greek-fontenc.def
	$(PYLIT) greek-fontenc.def
	$(RST2HTML) greek-fontenc.def.txt greek-fontenc.def.html

lgrenc.def.html: lgrenc.def
	$(PYLIT) lgrenc.def
	$(RST2HTML) lgrenc.def.txt lgrenc.def.html

textalpha.sty.html: textalpha.sty
	$(PYLIT) textalpha.sty
	$(RST2HTML) textalpha.sty.txt textalpha.sty.html

alphabeta.sty.html: alphabeta.sty
	$(PYLIT) alphabeta.sty
	$(RST2HTML) alphabeta.sty.txt alphabeta.sty.html

alphabeta-tuenc.def.html: alphabeta-tuenc.def
	$(PYLIT) alphabeta-tuenc.def
	$(RST2HTML) alphabeta-tuenc.def.txt alphabeta-tuenc.html

alphabeta-lgr.def.html: alphabeta-lgr.def
	$(PYLIT) alphabeta-lgr.def
	$(RST2HTML) alphabeta-lgr.def.txt alphabeta-lgr.def.html

lgr2licr.lua.html: lgr2licr.lua
	$(PYLIT) lgr2licr.lua
	$(RST2HTML) lgr2licr.lua.txt lgr2licr.lua.html

# User documentation
# ==================

pdf: alphabeta-doc.pdf diacritics.pdf tuenc-greek-doc.pdf greekhyperref.pdf \
     lgrenc-test.pdf textalpha-doc.pdf

TEXTALPHA = textalpha.sty greek-fontenc.def
ALPHABETA = $(TEXTALPHA) alphabeta.sty

lgrenc-test.pdf: lgrenc-test.tex lgrenc.def greek-fontenc.def
	$(LATEX) lgrenc-test.tex

tuenc-greek-doc.pdf: tuenc-greek-doc.tex tuenc-greek.def greek-fontenc.def
	$(RUBBER) -m xelatex tuenc-greek-doc.tex

textalpha-doc.pdf: textalpha-doc.tex lgrenc.def $(TEXTALPHA)
	$(LATEX) textalpha-doc.tex

alphabeta-doc.pdf: alphabeta-doc.tex $(ALPHABETA) lgrenc.def
	$(LATEX) alphabeta-doc.tex

alphabeta-doc-tuenc.pdf: alphabeta-doc.tex $(ALPHABETA) tuenc-greek.def
	$(RUBBER) -m xelatex alphabeta-doc.tex
	mv alphabeta-doc.pdf alphabeta-doc-tuenc.pdf

greekhyperref.pdf: greekhyperref.tex $(ALPHABETA) lgrenc.def
	$(LATEX) greekhyperref.tex

diacritics.pdf: diacritics.tex lgrenc.def greek-fontenc.def
	$(LATEX) diacritics.tex


# Installation
# ------------

install: all
	$(COPY) *.def $(DESTDIR)
	$(COPY) *.sty $(DESTDIR)

install-doc: doc
	$(COPY) README $(DOCDIR)
	$(COPY) *.def $(DOCDIR)
	$(COPY) *.sty $(DOCDIR)
	$(COPY) *.lua $(DOCDIR)
	$(COPY) *.html $(DOCDIR)
	$(COPY) *.tex $(DOCDIR)
	$(COPY) *.pdf $(DOCDIR)
	$(COPY) Makefile $(DOCDIR)

# Cleanup
# -------
 
.PHONY: clean

clean:
	rm -f *.aux *.log *.toc *~