Windows: Permit docbook validation using xmllint
[openafs.git] / doc / xml / ReleaseNotesWindows / NTMakefile
index 1421930..5d892d2 100644 (file)
@@ -33,30 +33,41 @@ VERSFILE = version
 CYGWIN     = c:/cygwin
 !ENDIF
 !IFNDEF DOCBOOK_XSL
+!IF (EXIST($(CYGWIN)/usr/share/sgml/docbook/xsl-stylesheets))
+DOCBOOK_XSL = $(CYGWIN)/usr/share/sgml/docbook/xsl-stylesheets
+!ELSE IF (EXIST($(CYGWIN)/usr/share/docbook-xsl))
 DOCBOOK_XSL = $(CYGWIN)/usr/share/docbook-xsl
+!ELSE
+!ERROR DOCBOOK_XSL cannot be determined
+!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