@echo off rem ********************************************************** rem rem This batch file generates/updates source code rem documentation for the Circular Buffer library. rem rem Author: Jan Gaspar (jano_gaspar[at]yahoo.com) rem rem Before running this batch file you have to install doxygen rem (http://www.doxygen.org) and xsltproc (http://xmlsoft.org) rem and setup the system PATH variable. rem rem Usage: rem For updating the source code documentation of the rem circular_buffer run: rem rem >update_srcdoc.bat circular_buffer rem rem rem For the circular_buffer_space_optimized run: rem rem >update_srcdoc.bat circular_buffer_space_optimized rem rem rem Note: rem Documentation generation was tested with the doxygen rem version 1.3.5. rem rem Related files: rem Doxyfile - doxygen configuration file. rem doxygen2html.xslt - XSL transformation from the XML rem files generated by doxygen into rem HTML source documentation. rem html2xhtml.xslt - helper XSL transformation which rem converts HTML into XHTML. rem update_srcdoc.xslt - XSL transformation updating rem source code documentation section rem in the specified file. rem rem ********************************************************** set docfile=%1.html if exist %docfile% goto update echo 'Usage: update_srcdoc.bat container' goto end :update rem ********************************************************** rem Generate XML files from the source files. The files will rem be generated into a temporary subdirectory (srcdoc). rem ********************************************************** doxygen rem ********************************************************** rem Convert XML files into HTML source code documentation. rem ********************************************************** xsltproc --stringparam container %1 --stringparam xmldir srcdoc -o srcdoc\srcdoc.html doxygen2html.xslt srcdoc\index.xml rem ********************************************************** rem Convert the original HTML documentation into XHTML. rem ********************************************************** xsltproc --html -o srcdoc\%1.xhtml html2xhtml.xslt %docfile% rem ********************************************************** rem Merge the XHTML documentation with the generated HTML rem source code documentation. The output will replace the rem original HTML documentation. rem ********************************************************** xsltproc --stringparam srcdoc srcdoc/srcdoc.html -o %docfile% update_srcdoc.xslt srcdoc\%1.xhtml rem ********************************************************** rem Deleting temporary files. rem ********************************************************** del /q srcdoc rem ********************************************************** rem Deleting temporary directory. rem ********************************************************** rmdir srcdoc :end