New
[idzebra-moved-to-github.git] / etc / Makefile
1 # $Id: Makefile,v 1.1 2006-02-16 10:43:15 mike Exp $
2
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.
9
10 test: test-rng test-xsd test-dtd
11
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 $<
15
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 $<
19
20 test-dtd:
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 $<
25
26 gfs-config.rng: gfs-config.rnc
27         rm -f $@
28         trang $? $@
29         chmod ugo-w $@
30
31 # Trang generates "explain.xsd" as a side-effect
32 gfs-config.xsd: gfs-config.rnc
33         rm -f $@ explain.xsd
34         trang $? $@
35         chmod ugo-w $@ explain.xsd
36
37 gfs-config.dtd: gfs-config.rnc
38         rm -f $@
39         trang $? $@
40         chmod ugo-w $@
41
42 clean:
43         rm -f gfs-config.rng gfs-config.xsd explain.xsd gfs-config.dtd 
44