From: handa Date: Tue, 17 Feb 2009 11:30:11 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=925f17322d05663bd1e040d7e4f2df1070740860;p=m17n%2Fm17n-docs.git *** empty log message *** --- diff --git a/Makefile.am b/Makefile.am index b8c5d28..064f506 100644 --- a/Makefile.am +++ b/Makefile.am @@ -264,9 +264,10 @@ doxyfile-man%.usr: doxyfile-man% data/exprog.txt: ${EXAMPLE_PROGS} utils/exprog.sh utils/exprog.sh ${EXAMPLE_PROGS} > $@ -data/dbdata.txt: ${DBDATA} ${DBIMAGE} @M17NDB@/mdb.xml utils/expand-mdb.awk +data/dbdata.txt: ${DBDATA} ${DBIMAGE} @M17NDB@/mdb.xml utils/expand-mdb.awk \ + utils/expand-mdb.sed [ -d data ] || mkdir data - SEDFILE=`pwd`/utils/expand-mdb.sed; \ + SEDFILE=utils/expand-mdb.sed; \ @AWK@ -v SEDFILE=$$SEDFILE -v M17NDB=@M17NDB@ -f utils/expand-mdb.awk @M17NDB@/mdb.xml > data/expanded-mdb.xml data/dbformat.txt: ${DBFORMAT} utils/dbformat.sh diff --git a/utils/expand-mdb.awk b/utils/expand-mdb.awk index 1e5e3fb..3d037f1 100644 --- a/utils/expand-mdb.awk +++ b/utils/expand-mdb.awk @@ -26,8 +26,8 @@ BEGIN { to = match($0, "<\/filename>"); TAIL = substr($0, to + RLENGTH); FILE = sprintf("%s%s", SUBDIR[KEY], substr($0, from+10, to - (from+10))); - system(sprintf("cd %s; ls %s|sed -f %s", M17NDB, FILE, SEDFILE)); - if (length(TAIL) > 0) + system(sprintf("ls %s/%s|sed -f %s", M17NDB, FILE, SEDFILE)); + if (length(TAIL) > 0 && ! match(TAIL, "^[ \t]*$")) print TAIL; next; }