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.
8 test: test-rng test-xsd test-dtd
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 $<
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 $<
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 $<
24 gfs-config.rng: gfs-config.rnc
29 # Trang generates "explain.xsd" as a side-effect
30 gfs-config.xsd: gfs-config.rnc
33 chmod ugo-w $@ explain.xsd
35 gfs-config.dtd: gfs-config.rnc
41 rm -f gfs-config.rng gfs-config.xsd explain.xsd gfs-config.dtd