1 # $Id: Makefile,v 1.1 2006-02-16 10:43:15 mike Exp $
3 # This doesn't actually build anything, it just tests whether the
4 # configuration files here correspond with the schema. The master
5 # schema is in Relax-NG Compact (.rnc) format: this cannot be used
6 # directly as xmllint does not support it; but from this, we generate
7 # schemas expressed in Relax-NG XML (.rng), XML Schema (.xsd) and XML
8 # DTD (.dtd), each of which is then tested.
10 test: test-rng test-xsd test-dtd
12 test-rng: test-rng-example test-rng-itunes test-rng-minimal
13 test-rng-%: gfs-%.xml gfs-config.rng
14 xmllint --noout --relaxng gfs-config.rng $<
16 test-xsd: test-xsd-example test-xsd-itunes test-xsd-minimal
17 test-xsd-%: gfs-%.xml gfs-config.xsd
18 xmllint --noout --schema gfs-config.xsd $<
21 @echo "# DTD testing skipped due to lack of namespace support"
22 #test-dtd: test-dtd-example test-dtd-itunes test-dtd-minimal
23 test-dtd-%: gfs-%.xml gfs-config.dtd
24 xmllint --noout --dtdvalid gfs-config.dtd $<
26 gfs-config.rng: gfs-config.rnc
31 # Trang generates "explain.xsd" as a side-effect
32 gfs-config.xsd: gfs-config.rnc
35 chmod ugo-w $@ explain.xsd
37 gfs-config.dtd: gfs-config.rnc
43 rm -f gfs-config.rng gfs-config.xsd explain.xsd gfs-config.dtd