summaryrefslogtreecommitdiff
path: root/data/Makefile.am
blob: 4319ad5ce0cb391d20a883aa77281012964fc50d (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
MAINTAINERCLEANFILES = Makefile.in
CLEANFILES = thbrk.tri tdict.txt

dictdatadir = $(datadir)/libthai

if ENABLE_DICT
dictdata_DATA = thbrk.tri
else
dictdata_DATA =
endif

TDICT_SRC = 				\
	$(srcdir)/tdict-common.txt	\
	$(srcdir)/tdict-collection.txt	\
	$(srcdir)/tdict-district.txt	\
	$(srcdir)/tdict-city.txt	\
	$(srcdir)/tdict-country.txt	\
	$(srcdir)/tdict-geo.txt		\
	$(srcdir)/tdict-history.txt	\
	$(srcdir)/tdict-ict.txt		\
	$(srcdir)/tdict-lang-ethnic.txt	\
	$(srcdir)/tdict-proper.txt	\
	$(srcdir)/tdict-science.txt	\
	$(srcdir)/tdict-spell.txt	\
	$(srcdir)/tdict-std.txt		\
	$(srcdir)/tdict-std-compound.txt

EXTRA_DIST = thbrk.abm $(TDICT_SRC)

tdict.txt: $(TDICT_SRC)
	cat $(TDICT_SRC) | LC_ALL=C sort -u > tdict.txt

thbrk.tri: tdict.txt
	if test ! -e thbrk.abm; then \
	  ln -s $(top_srcdir)/data/thbrk.abm . ; \
	fi
	rm -f thbrk.tri
	$(TRIETOOL) thbrk add-list -e utf-8 tdict.txt