summaryrefslogtreecommitdiff
path: root/Makefile
blob: 5b01c7a1a132c6326c6f7b855d3f9f974de284cb (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
26
27
28
29
30
31
32
ELBERFELDER_CHAPTERS=$(wildcard elberfelder-bibel/chapters/*/*.html)
ELBERFELDER_CHAPTERS_XML=$(ELBERFELDER_CHAPTERS:.html=.xml)

LUTHER_CHAPTERS=$(wildcard luther-bibel-1984/chapters/*/*.html)
LUTHER_CHAPTERS_XML=$(LUTHER_CHAPTERS:.html=.xml)

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

all: elberfelder2006.zip menge.zip luther-1984.zip

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

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

luther-1984.xml: $(LUTHER_CHAPTERS_XML)
	./concat.sh luther-bibel-1984 "Luther Bibel 1984" > $@
	xmllint --noout --schema zef2005.xsd $@ || (mv $@ $@.fail; exit 1)

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

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

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