diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2014-07-20 20:58:29 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2014-07-20 20:58:29 -0700 |
commit | ef3753622244c55b246fb952868c3ea7aac4869a (patch) | |
tree | 9f1a26b6f5470687475ac1158cb591383111bcb1 /Makefile | |
parent | adecd96194deca0b23d2220b0fbc6ce9d24c8499 (diff) | |
download | clientdata-ef3753622244c55b246fb952868c3ea7aac4869a.tar.gz clientdata-ef3753622244c55b246fb952868c3ea7aac4869a.tar.bz2 clientdata-ef3753622244c55b246fb952868c3ea7aac4869a.tar.xz clientdata-ef3753622244c55b246fb952868c3ea7aac4869a.zip |
Add XSD/indent checking
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..2a66f887 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +# for pipefail +SHELL=/bin/bash +.SECONDARY: +.DELETE_ON_ERROR: + +check: + git diff --exit-code + +XMLS = $(shell find -type f -name '*.xml') +check: check-xml +check-xml: $(patsubst %.xml,%.xml.ok,${XMLS}) + find -name '*.xml.ok' -delete + find -name '*.xml.out' -delete +%.xml.ok: %.xml %.xml.out + diff $^ + touch $@ +%.xml.out: %.xml + set -e -o pipefail; \ + xmllint --format --schema tools/tmw.xsd $< 2>&1 > $@ | grep -v 'Skipping import of schema' + +check: xsd +xsd: + xmllint --format --schema tools/dl/XMLSchema.xsd tools/tmw.xsd > tmw-formatted.xsd + diff tools/tmw.xsd tmw-formatted.xsd + rm tmw-formatted.xsd |