summaryrefslogtreecommitdiff
path: root/Makefile
blob: b57090e2f9444ffbc6e27c7be9827fda624b36f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ELBERFELDER_CHAPTERS=$(wildcard elberfelder/chapters/*/*.html)
ELBERFELDER_CHAPTERS_XML=$(ELBERFELDER_CHAPTERS:.html=.xml)

MENGE_CHAPTERS=$(wildcard menge/chapters/*/*.html)
MENGE_CHAPTERS_XML=$(MENGE_CHAPTERS:.html=.xml)

all: elberfelder2006.zip menge.zip

%.xml: %.html convert.sed convert.xsl
	./convert.sed "$<" | xsltproc --encoding utf-8 --html convert.xsl - > "$@"

elberfelder2006.xml: $(ELBERFELDER_CHAPTERS_XML)
	./concat.sh elberfelder "Elberfelder 2006" > $@
	xmllint --noout --schema zef2005.xsd $@

menge.xml: $(MENGE_CHAPTERS_XML)
	./concat.sh menge "Menge-Bibel2" > $@
	xmllint --noout --schema zef2005.xsd $@ || (mv $@ $@.fail; exit 1)

%.zip: %.xml
	zip $@ $<

clean:
	rm -f $(ELBERFELDER_CHAPTERS_XML) $(MENGE_CHAPTERS_XML)
	rm -f elberfelder2006.{xml,zip} menge.{xml,zip}