(pkgdata_DATA): Delete ${TABLES}.
authorhanda <handa>
Tue, 5 Jun 2007 12:26:15 +0000 (12:26 +0000)
committerhanda <handa>
Tue, 5 Jun 2007 12:26:15 +0000 (12:26 +0000)
(EXTRA_DIST): Remove this variable.
(dist_pkgdata_DATA): New variable.
(dist_noinst_SCRIPTS): New variable.
(native.ext): Don't use native.sh.
(CLEANFILES): New variable.

LANGDATA/Makefile.am

index 2af3661..4882c79 100644 (file)
@@ -25,12 +25,19 @@ pkgdatadir=$(datadir)/m17n
 
 TABLES=@LANGNAME_TABLES@
 
-pkgdata_DATA = LANGUAGE.tbl ${TABLES}
+pkgdata_DATA = LANGUAGE.tbl
 
-EXTRA_DIST = LANGUAGE.tbl ${TABLES}
+dist_pkgdata_DATA = ${TABLES} native.txt ISO-639-2.txt
 
-native.ext: native.sh ${TABLES}
-       ./native.sh > $@
+dist_noinst_SCRIPTS = LANGUAGE.awk
+
+native.ext: ${TABLES}
+       (for f in [a-z][a-z].lnm [a-z][a-z][a-z].lnm; do \
+         l=`basename $$f .tbl`; \
+         sed -n -e "/($$l /s/(\([a-z]*\)[^\"]*\"\([^\"]*\)\")/\1|\2/p" < $$f; \
+       done) > $@
 
 LANGUAGE.tbl: LANGUAGE.awk ${TABLES} native.txt native.ext
-       @$(AWK) -f LANGUAGE.awk '-F|' < ISO-639-2.txt > $@
+       $(AWK) -f LANGUAGE.awk '-F|' < ISO-639-2.txt > $@
+
+CLEANFILES = native.ext LANGUAGE.tbl