Windows: Permit docbook validation using xmllint
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 13 Jul 2010 03:36:56 +0000 (23:36 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 13 Jul 2010 13:05:30 +0000 (06:05 -0700)
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 <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

doc/xml/AdminGuide/NTMakefile
doc/xml/QuickStartUnix/NTMakefile
doc/xml/ReleaseNotesWindows/NTMakefile
doc/xml/UserGuide/NTMakefile

index f899734..a7508b9 100644 (file)
@@ -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
index 953b2de..352d7e5 100644 (file)
@@ -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
index 81e81e9..5d892d2 100644 (file)
@@ -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
index 0ba8bfd..3f59aa9 100644 (file)
@@ -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