Add a very simple 'check' target; its only job is to validate every XML data file against the RNG schema, so there is no risk to ship files that do not conform the it. --- Makefile | 9 +++++++++ README | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 6ff9b5c..a7a5c68 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,8 @@ ARCHIVE = osinfo-db-$(TODAY).tar.xz ZANATA = zanata-cli +XMLLINT = xmllint + V = 0 V_I18N = $(V_I18N_$(V)) @@ -114,3 +116,10 @@ update-po: fi; \ done +check: $(DATA_FILES) $(SCHEMA_FILES) + for xml in `find data -name '*.xml' | sort`; do \ + if ! $(XMLLINT) --relaxng data/schema/osinfo.rng --noout $$xml; then \ + exit 1; \ + fi; \ + done + diff --git a/README b/README index b2822cb..a352115 100644 --- a/README +++ b/README @@ -17,6 +17,8 @@ Dependencies - Required: - osinfo-db-tools - intltool +- Optional: + - xmllint (from libxml2) -- for testing Patch submissions ================= -- 2.9.3 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo