aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2024-06-11 18:17:59 +0200
committerUlrich Müller <ulm@gentoo.org>2024-06-11 18:17:59 +0200
commit10510e60c2f5b5e3a3cc9c54d5a8d38ea6288b1a (patch)
treebbf45e23d588362adab8a15f6977aeadaae5ca7a /Makefile
parentdevbook.xsl: Rename parameter of repeat-string template (diff)
downloaddevmanual-10510e60c2f5b5e3a3cc9c54d5a8d38ea6288b1a.tar.gz
devmanual-10510e60c2f5b5e3a3cc9c54d5a8d38ea6288b1a.tar.bz2
devmanual-10510e60c2f5b5e3a3cc9c54d5a8d38ea6288b1a.zip
Makefile: Check if /guide/@self agrees with the document path
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1bfa86e..8f3014e 100644
--- a/Makefile
+++ b/Makefile
@@ -89,6 +89,13 @@ install: all
validate: devbook.rng
@xmllint --noout --quiet --relaxng $< $(XMLS)
+ @# Check if /guide/@self agrees with the document path
+ @for file in $(XMLS); do \
+ self=$$(xmllint --quiet --xpath 'string(/guide/@self)' $${file}); \
+ if test "$${self}text.xml" != "$${file#./}"; then \
+ echo "$${file}: bad self attribute '$${self}'"; exit 1; \
+ fi; \
+ done
@echo "xmllint validation successful"
%.rng: %.rnc