From: Jeffrey Altman Date: Tue, 13 Jul 2010 03:36:56 +0000 (-0400) Subject: Windows: Permit docbook validation using xmllint X-Git-Tag: openafs-devel-1_5_76~138 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=2b85b8c31d96b0ac558acb1bf95fb7b21c66cb3c Windows: Permit docbook validation using xmllint Add a "check" rule to each of the docbook directories that uses xmllint.exe (from Cygwin) to validate the docbook source against the DTD. Validation failures will halt the build. Change-Id: Ifcfcab11d5077381bfe7fa5e3767070a8d55cb21 Reviewed-on: http://gerrit.openafs.org/2391 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/doc/xml/AdminGuide/NTMakefile b/doc/xml/AdminGuide/NTMakefile index f899734..a7508b9 100644 --- a/doc/xml/AdminGuide/NTMakefile +++ b/doc/xml/AdminGuide/NTMakefile @@ -42,12 +42,15 @@ DOCBOOK_XSL = $(CYGWIN)/usr/share/docbook-xsl !ENDIF !ENDIF XSLTPROC = xsltproc.exe +XMLLINT = xmllint.exe HTML_XSL = $(DOCBOOK_XSL)/html/chunk.xsl HTML_PARMS = --param navig.graphics 1 --stringparam navig.graphics.path ../ CHM_XSL = $(DOCBOOK_XSL)/htmlhelp/htmlhelp.xsl +BOOK = auagd000.xml + XMLSRCS = \ - auagd000.xml \ + $(BOOK) \ auagd005.xml \ auagd006.xml \ auagd007.xml \ @@ -73,17 +76,24 @@ XMLSRCS = \ index.html: $(XMLSRCS) @echo Building OpenAFS Administrator Guide in HTML format - $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) auagd000.xml + $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) $(BOOK) htmlhelp.chm: $(XMLSRCS) @echo Building OpenAFS Administrator Guide in HTML Help format - $(XSLTPROC) $(CHM_XSL) auagd000.xml + $(XSLTPROC) $(CHM_XSL) $(BOOK) -hhc.exe htmlhelp.hhp $(DEL) *.html $(DEL) *.hh? $(DEL) *.chw -install: htmlhelp.chm index.html +pdf: $(XMLSRCS) + @echo Building OpenAFS Administrator Guide in PDF format + bash -c "dblatex --pdf --verbose $(BOOK)" + +check: $(XMLSRCS) + $(XMLLINT) --noout --valid $(BOOK) + +install: check htmlhelp.chm index.html clean:: $(DEL) *.html diff --git a/doc/xml/QuickStartUnix/NTMakefile b/doc/xml/QuickStartUnix/NTMakefile index 953b2de..352d7e5 100644 --- a/doc/xml/QuickStartUnix/NTMakefile +++ b/doc/xml/QuickStartUnix/NTMakefile @@ -42,12 +42,14 @@ DOCBOOK_XSL = $(CYGWIN)/usr/share/docbook-xsl !ENDIF !ENDIF XSLTPROC = xsltproc.exe +XMLLINT = xmllint.exe HTML_XSL = $(DOCBOOK_XSL)/html/chunk.xsl HTML_PARMS = --param navig.graphics 1 --stringparam navig.graphics.path ../ CHM_XSL = $(DOCBOOK_XSL)/htmlhelp/htmlhelp.xsl +BOOK = auqbg000.xml XMLSRCS = \ - auqbg000.xml \ + $(BOOK) \ auqbg003.xml \ auqbg004.xml \ auqbg005.xml \ @@ -59,17 +61,20 @@ XMLSRCS = \ index.html: $(XMLSRCS) @echo Building Unix Quick Start Guide in HTML format - $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) auqbg000.xml + $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) $(BOOK) htmlhelp.chm: $(XMLSRCS) @echo Building Unix Quick Start Guide in HTML Help format - $(XSLTPROC) $(CHM_XSL) auqbg000.xml + $(XSLTPROC) $(CHM_XSL) $(BOOK) -hhc.exe htmlhelp.hhp $(DEL) *.html $(DEL) *.hh? $(DEL) *.chw -install: htmlhelp.chm index.html +check: $(XMLSRCS) + $(XMLLINT) --noout --valid $(BOOK) + +install: check htmlhelp.chm index.html clean:: $(DEL) *.html diff --git a/doc/xml/ReleaseNotesWindows/NTMakefile b/doc/xml/ReleaseNotesWindows/NTMakefile index 81e81e9..5d892d2 100644 --- a/doc/xml/ReleaseNotesWindows/NTMakefile +++ b/doc/xml/ReleaseNotesWindows/NTMakefile @@ -42,27 +42,32 @@ DOCBOOK_XSL = $(CYGWIN)/usr/share/docbook-xsl !ENDIF !ENDIF XSLTPROC = xsltproc.exe +XMLLINT = xmllint.exe HTML_XSL = $(DOCBOOK_XSL)/html/chunk.xsl HTML_PARMS = --param navig.graphics 1 --stringparam navig.graphics.path ../ CHM_XSL = $(DOCBOOK_XSL)/htmlhelp/htmlhelp.xsl +BOOK = relnotes.xml XMLSRCS = \ - relnotes.xml \ + $(BOOK) \ $(VERSFILE).xml index.html: $(XMLSRCS) @echo Building OpenAFS Release Notes in HTML format - $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) relnotes.xml + $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) $(BOOK) htmlhelp.chm: $(XMLSRCS) @echo Building OpenAFS Release Notes in HTML Help format - $(XSLTPROC) $(CHM_XSL) relnotes.xml + $(XSLTPROC) $(CHM_XSL) $(BOOK) -hhc.exe htmlhelp.hhp $(DEL) *.html $(DEL) *.hh? $(DEL) *.chw -install: htmlhelp.chm index.html +check: $(XMLSRCS) + $(XMLLINT) --noout --valid $(BOOK) + +install: check htmlhelp.chm index.html clean:: $(DEL) *.html diff --git a/doc/xml/UserGuide/NTMakefile b/doc/xml/UserGuide/NTMakefile index 0ba8bfd..3f59aa9 100644 --- a/doc/xml/UserGuide/NTMakefile +++ b/doc/xml/UserGuide/NTMakefile @@ -42,12 +42,14 @@ DOCBOOK_XSL = $(CYGWIN)/usr/share/docbook-xsl !ENDIF !ENDIF XSLTPROC = xsltproc.exe +XMLLINT = xmllint.exe HTML_XSL = $(DOCBOOK_XSL)/html/chunk.xsl HTML_PARMS = --param navig.graphics 1 --stringparam navig.graphics.path ../ CHM_XSL = $(DOCBOOK_XSL)/htmlhelp/htmlhelp.xsl +BOOK = auusg000.xml XMLSRCS = \ - auusg000.xml \ + $(BOOK) \ auusg003.xml \ auusg004.xml \ auusg005.xml \ @@ -62,17 +64,20 @@ XMLSRCS = \ index.html: $(XMLSRCS) @echo Building OpenAFS User Guide in HTML format - $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) auusg000.xml + $(XSLTPROC) $(HTML_PARMS) $(HTML_XSL) $(BOOK) htmlhelp.chm: $(XMLSRCS) @echo Building OpenAFS User Guide in HTML Help format - $(XSLTPROC) $(CHM_XSL) auusg000.xml + $(XSLTPROC) $(CHM_XSL) $(BOOK) -hhc.exe htmlhelp.hhp $(DEL) *.html $(DEL) *.hh? $(DEL) *.chw -install: htmlhelp.chm index.html +check: $(XMLSRCS) + $(XMLLINT) --noout --valid $(BOOK) + +install: check htmlhelp.chm index.html clean:: $(DEL) *.html