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
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;
}