| 1 |
|
| 2 |
FREEDICT_TOOLS ?= ../../tools |
| 3 |
DISTFILES = AUTHORS ChangeLog COPYING lat-deu-header.tei lat-deu.tei \ |
| 4 |
freedict-P5.xml freedict-P5.rng freedict-P5.dtd freedict-dictionary.css INSTALL Makefile NEWS README words.xsl words.xml |
| 5 |
include $(FREEDICT_TOOLS)/mk/dicts.mk |
| 6 |
|
| 7 |
|
| 8 |
clean:: |
| 9 |
-rm -f lat-deu.tmp xslt.tmp |
| 10 |
|
| 11 |
lat-deu.tei: lat-deu-header.tei words.xml words.xsl |
| 12 |
@echo 'Converting one custom XML format to TEI xml…' |
| 13 |
xsltproc words.xsl words.xml >> $(@:tei=tmp) |
| 14 |
grep -B 99999 '<body>' $(@:.tei=-header.tei) > $@ |
| 15 |
tail -n +2 < $(@:tei=tmp) >> $@ |
| 16 |
grep -A 9999 '</body>' $(@:.tei=-header.tei) >> $@ |
| 17 |
-rm $(@:tei=tmp) |
| 18 |
@echo 'Reformatting TEI file…' |
| 19 |
xmllint --format - > $(@:tei=tmp) < $@ |
| 20 |
cat $(@:tei=tmp) > $@ |
| 21 |
rm $(@:tei=tmp) |
| 22 |
|
| 23 |
|
| 24 |
|