From a76a304201584408ae23cc1a65430e4260f8868a Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 19 Feb 2009 04:20:33 +0000 Subject: [PATCH] *** empty log message *** --- Makefile.am | 1 + utils/expand-mdb.awk | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Makefile.am b/Makefile.am index 1ab60a8..630b80f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -267,6 +267,7 @@ data/exprog.txt: ${EXAMPLE_PROGS} utils/exprog.sh data/dbdata.txt: ${DBDATA} ${DBIMAGE} @M17NDB@/mdb.xml utils/expand-mdb.awk [ -d data ] || mkdir data @AWK@ -v M17NDB=@M17NDB@ -f utils/expand-mdb.awk @M17NDB@/mdb.xml > data/expanded-mdb.xml + xsltproc -xinclude utils/description-en.xsl data/expanded-mdb.xml > $@ data/dbformat.txt: ${DBFORMAT} utils/dbformat.sh utils/dbformat.sh ${DBFORMAT} > $@ diff --git a/utils/expand-mdb.awk b/utils/expand-mdb.awk index b2a2f33..45d3d7b 100644 --- a/utils/expand-mdb.awk +++ b/utils/expand-mdb.awk @@ -1,8 +1,8 @@ BEGIN { SUBDIR["input-method-*"] = "MIM/"; SUBDIR["font-layouter-*"] = "FLT/"; - SUBDIR["language-name-*"] = "LANGDATA/"; SUBDIR["standard-language-iso639"] = "LANGDATA/"; + IGNORED["language-name-*"] = 1; KEY=""; XINCLUDEFMT="\n"; } @@ -17,21 +17,25 @@ BEGIN { } /[^<]*<\/filename>/ { - from = match($0, "[^<]*"); - to = from + RLENGTH; - printf "%s", substr($0, 1, from - 1); - TAIL = substr($0, to); - FILE = substr($0, from + 10, to - from - 21); - COMMAND = "cd "M17NDB"/"SUBDIR[KEY]"; ls "FILE; - COMMAND | getline LINE; - print ""LINE""; - printf XINCLUDEFMT, M17NDB"/"SUBDIR[KEY]LINE; - while (COMMAND | getline LINE) { + if (IGNORED[KEY]) + print; + else { + from = match($0, "[^<]*"); + to = from + RLENGTH; + printf "%s", substr($0, 1, from - 1); + TAIL = substr($0, to); + FILE = substr($0, from + 10, to - from - 21); + COMMAND = "cd "M17NDB"/"SUBDIR[KEY]"; ls "FILE; + COMMAND | getline LINE; print ""LINE""; printf XINCLUDEFMT, M17NDB"/"SUBDIR[KEY]LINE; + while (COMMAND | getline LINE) { + print ""LINE""; + printf XINCLUDEFMT, M17NDB"/"SUBDIR[KEY]LINE; + } + if (length(TAIL) > 0 && ! match(TAIL, "^[ \t]*$")) + print TAIL; } - if (length(TAIL) > 0 && ! match(TAIL, "^[ \t]*$")) - print TAIL; next; } -- 1.7.10.4