*** empty log message ***
[m17n/m17n-db.git] / LANGDATA / Makefile.am
1 # Makefile.am -- Makefile for language-related data of the m17n database
2 # Copyright (C) 2007
3 #   National Institute of Advanced Industrial Science and Technology (AIST)
4 #   Registration Number H15PRO112
5
6 # This file is part of the m17n database; a sub-part of the m17n
7 # library.
8
9 # The m17n library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public License
11 # as published by the Free Software Foundation; either version 2.1 of
12 # the License, or (at your option) any later version.
13
14 # The m17n library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
18
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with the m17n library; if not, write to the Free
21 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 # Boston, MA 02110-1301, USA.
23
24 pkgdatadir=$(datadir)/m17n
25
26 TABLES=@LANGNAME_TABLES@
27
28 pkgdata_DATA = LANGUAGE.tbl ${TABLES}
29
30 EXTRA_DIST = ${TABLES} native.txt ISO-639-2.txt
31
32 dist_noinst_SCRIPTS = LANGUAGE.awk
33
34 native.ext: ${TABLES}
35         (for f in [a-z][a-z].lnm [a-z][a-z][a-z].lnm; do \
36           l=`basename $$f .tbl`; \
37           sed -n -e "/($$l /s/(\([a-z]*\)[^\"]*\"\([^\"]*\)\")/\1|\2/p" < $$f; \
38         done) > $@
39
40 LANGUAGE.tbl: LANGUAGE.awk ${TABLES} native.txt native.ext
41         $(AWK) -f LANGUAGE.awk '-F|' < ISO-639-2.txt > $@
42
43 CLEANFILES = native.ext LANGUAGE.tbl