dom: accept type="adelete" (accept bad deletes)
[idzebra-moved-to-github.git] / etc / Makefile
1 # This doesn't actually build anything, it just tests whether the
2 # configuration files here correspond with the schema.  The master
3 # schema is in Relax-NG Compact (.rnc) format: this cannot be used
4 # directly as xmllint does not support it; but from this, we generate
5 # schemas expressed in Relax-NG XML (.rng), XML Schema (.xsd) and XML
6 # DTD (.dtd), each of which is then tested.
7
8 test: test-rng test-xsd test-dtd
9
10 test-rng: test-rng-example test-rng-itunes test-rng-minimal
11 test-rng-%: gfs-%.xml gfs-config.rng
12         xmllint --noout --relaxng gfs-config.rng $<
13
14 test-xsd: test-xsd-example test-xsd-itunes test-xsd-minimal
15 test-xsd-%: gfs-%.xml gfs-config.xsd
16         xmllint --noout --schema gfs-config.xsd $<
17
18 test-dtd:
19         @echo "# DTD testing skipped due to lack of namespace support"
20 #test-dtd: test-dtd-example test-dtd-itunes test-dtd-minimal
21 test-dtd-%: gfs-%.xml gfs-config.dtd
22         xmllint --noout --dtdvalid gfs-config.dtd $<
23
24 gfs-config.rng: gfs-config.rnc
25         rm -f $@
26         trang $? $@
27         chmod ugo-w $@
28
29 # Trang generates "explain.xsd" as a side-effect
30 gfs-config.xsd: gfs-config.rnc
31         rm -f $@ explain.xsd
32         trang $? $@
33         chmod ugo-w $@ explain.xsd
34
35 gfs-config.dtd: gfs-config.rnc
36         rm -f $@
37         trang $? $@
38         chmod ugo-w $@
39
40 clean:
41         rm -f gfs-config.rng gfs-config.xsd explain.xsd gfs-config.dtd 
42