qpc/doxygen/make.bat

94 lines
2.8 KiB
Batchfile
Raw Normal View History

2013-12-30 17:37:40 -05:00
@echo off
:: ==========================================================================
:: Product: QP/C script for generating Doxygen documentation
:: Copyright (C) 2005 Quantum Leaps, LLC. All rights reserved.
2014-09-22 11:45:23 -04:00
::
:: SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-QL-commercial
2014-09-22 11:45:23 -04:00
::
:: This software is dual-licensed under the terms of the open source GNU
:: General Public License version 3 (or any later version), or alternatively,
:: under the terms of one of the closed source Quantum Leaps commercial
:: licenses.
2014-09-22 11:45:23 -04:00
::
:: The terms of the open source GNU General Public License version 3
:: can be found at: <www.gnu.org/licenses/gpl-3.0>
2014-09-22 11:45:23 -04:00
::
:: The terms of the closed source Quantum Leaps commercial licenses
:: can be found at: <www.state-machine.com/licensing>
2014-09-22 11:45:23 -04:00
::
:: Redistributions in source code must retain this top-level comment block.
:: Plagiarizing this software to sidestep the license obligations is illegal.
2014-09-22 11:45:23 -04:00
::
:: Contact information:
:: <www.state-machine.com>
2019-10-27 11:57:33 -04:00
:: <info@state-machine.com>
2013-12-30 17:37:40 -05:00
:: ==========================================================================
2019-12-31 15:55:08 -05:00
@setlocal
2013-12-30 17:37:40 -05:00
2019-12-31 15:55:08 -05:00
@echo usage:
@echo make
@echo make -CHM
@echo make ...
2013-12-30 17:37:40 -05:00
2020-07-18 17:56:40 -04:00
:: Doxygen tool (adjust to your system) ......................................
@set DOXYGEN=doxygen
2013-12-30 17:37:40 -05:00
2020-07-18 17:56:40 -04:00
:: HTML Help tool (needed only with the -CHM option, (adjust to your system) .
@set HHC="C:\tools\HTML Help Workshop\hhc.exe"
2013-12-30 17:37:40 -05:00
2020-07-18 17:56:40 -04:00
:: Simple complexity metrics tool (adjust to your system) ...................
@set LIZARD=lizard
:: QP/C directory ............................................................
@set QPC=..
:: HTML outut directory ......................................................
@set HTML_OUT=%QPC%\html
2020-07-18 17:56:40 -04:00
:: Generate metrics.dox file...
@set METRICS_INP=%QPC%\include %QPC%\src -x %QPC%\src\qs\*
2020-03-17 21:33:20 -04:00
@set METRICS_OUT=metrics.dox
2013-12-30 17:37:40 -05:00
2020-03-17 21:33:20 -04:00
@echo /** @page metrics Code Metrics > %METRICS_OUT%
@echo.>> %METRICS_OUT%
@echo @code{cpp} >> %METRICS_OUT%
@echo Code Metrics >> %METRICS_OUT%
2013-12-30 17:37:40 -05:00
2020-03-17 21:33:20 -04:00
%LIZARD% -m -L500 -a10 -C20 -V %METRICS_INP% >> %METRICS_OUT%
2013-12-30 17:37:40 -05:00
2020-03-17 21:33:20 -04:00
@echo @endcode >> %METRICS_OUT%
@echo */ >> %METRICS_OUT%
2013-12-30 17:37:40 -05:00
2020-07-18 17:56:40 -04:00
:: Generate Doxygen Documentation...
2014-09-22 11:45:23 -04:00
if "%1"=="-CHM" (
2019-12-31 15:55:08 -05:00
@echo Generating HTML...
2020-07-18 17:56:40 -04:00
%DOXYGEN% Doxyfile-CHM
2019-12-31 15:55:08 -05:00
@echo Adding custom images...
2015-04-28 13:45:35 -04:00
xcopy img tmp\img\
xcopy /Y ..\..\ql-doxygen\jquery.js tmp
2015-04-28 13:45:35 -04:00
2019-12-31 15:55:08 -05:00
@echo Generating CHM...
2020-07-18 17:56:40 -04:00
%HHC% tmp\index.hhp
2019-12-31 15:55:08 -05:00
@echo.
@echo Cleanup...
@rmdir /S /Q tmp
2020-07-18 17:56:40 -04:00
@echo CHM file generated
2014-09-22 11:45:23 -04:00
) else (
2019-12-31 15:55:08 -05:00
@echo.
@echo Cleanup...
rmdir /S /Q %HTML_OUT%
2015-04-28 13:45:35 -04:00
2019-12-31 15:55:08 -05:00
@echo Generating HTML...
%DOXYGEN% Doxyfile%1
@echo Adding custom images...
xcopy img %HTML_OUT%\img\
xcopy /Y ..\..\ql-doxygen\jquery.js %HTML_OUT%
rem @qclean %HTML_OUT%
2014-09-22 11:45:23 -04:00
)
2013-12-30 17:37:40 -05:00
2019-12-31 15:55:08 -05:00
@endlocal