summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9bd1eb8d03c4ab2fde7c715238974c1a41868c98 (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
module 		= transliterator
zipball		= t-transliterator.zip
doc-pdf		= transliterator.pdf
license		= COPYING
doc-src		= doc/transliterator.tex
interface-src	= src/t-transliterator.xml
mod-src		= src/transliterator.lua
mod-src		+= src/trans_tables_bg.lua
mod-src		+= src/trans_tables_glag.lua
mod-src		+= src/trans_tables_gr.lua
mod-src		+= src/trans_tables_iso9.lua
mod-src		+= src/trans_tables_scntfc.lua
mod-src		+= src/trans_tables_sr.lua
mod-src		+= src/trans_tables_trsc.lua
mod-src		+= src/t-transliterator.mkii
mod-src		+= src/t-transliterator.mkiv
mod-src		+= src/t-transliterator.tex
script-src	= scripts/mtx-t-transliterate.lua
src 		= $(license) $(doc-src) $(mod-src) $(script-src)
texmf-doc	= doc/context/third/transliterator
texmf-scripts	= scripts/context/lua/third/transliterator
texmf-interface	= tex/context/interface/third
texmf-tex	= tex/context/third/transliterator

# zip for upload on modules.contextgarden.net
texmf-zip: build/$(zipball)

doc: build/$(doc-pdf)

build/$(doc-pdf): $(doc-src)
	mkdir -p -- build
	( pushd build && context ../$(doc-src); )

build/$(zipball): $(src) doc
	mkdir -p -- build/texmf/$(texmf-doc)
	mkdir -p -- build/texmf/$(texmf-scripts)
	mkdir -p -- build/texmf/$(texmf-interface)
	mkdir -p -- build/texmf/$(texmf-tex)
	cp -f -- build/$(doc-pdf) build/texmf/$(texmf-doc)/
	cp -f -- $(doc-src) build/texmf/$(texmf-doc)/
	cp -f -- $(doc-src) build/texmf/$(texmf-doc)/
	cp -f -- $(script-src) build/texmf/$(texmf-scripts)/
	cp -f -- $(interface-src) build/texmf/$(texmf-interface)/
	cp -f -- $(mod-src) build/texmf/$(texmf-tex)/
	# some dancing around needed to avoid including the build prefix
	( pushd build/texmf && zip -r $(zipball) doc scripts tex; )
	mv -f build/texmf/$(zipball) build

clean:
	rm -rf -- build

.PHONY: clean