Windows: Permit docbook validation using xmllint
[openafs.git] / doc / xml / ReleaseNotesWindows / NTMakefile
index f122add..5d892d2 100644 (file)
@@ -25,6 +25,7 @@
 # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+VERSFILE = version
 !INCLUDE ..\..\..\src\config\NTMakefile.$(SYS_NAME)
 !INCLUDE ..\..\..\src\config\NTMakefile.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
-        $(DEL) htmlhelp.chm
\ No newline at end of file
+        $(DEL) htmlhelp.chm
+        $(DEL) $(VERSFILE).xml
\ No newline at end of file