qpcpp/doxygen/make.bat

98 lines
3.0 KiB
Batchfile
Raw Normal View History

2013-12-30 17:41:15 -05:00
@echo off
:: ==========================================================================
:: Product: QP/C++ script for generating Doxygen documentation
2020-08-24 16:42:48 -04:00
:: Last Updated for Version: 6.9.0
:: Date of the Last Update: 2020-08-24
2014-09-22 11:48:11 -04:00
::
2018-10-25 11:13:01 -04:00
:: Q u a n t u m L e a P s
:: ------------------------
:: Modern Embedded Software
2014-09-22 11:48:11 -04:00
::
2020-03-17 21:33:58 -04:00
:: Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
2014-09-22 11:48:11 -04:00
::
:: This program is open source software: you can redistribute it and/or
:: modify it under the terms of the GNU General Public License as published
:: by the Free Software Foundation, either version 3 of the License, or
:: (at your option) any later version.
::
:: Alternatively, this program may be distributed and modified under the
:: terms of Quantum Leaps commercial licenses, which expressly supersede
:: the GNU General Public License and are specifically designed for
:: licensees interested in retaining the proprietary status of their code.
::
:: This program is distributed in the hope that it will be useful,
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
:: GNU General Public License for more details.
::
:: You should have received a copy of the GNU General Public License
:: along with this program. If not, see <http://www.gnu.org/licenses/>.
::
:: Contact information:
2019-12-31 15:56:23 -05:00
:: <www.state-machine.com/licensing>
:: <info@state-machine.com>
2013-12-30 17:41:15 -05:00
:: ==========================================================================
2019-12-31 15:56:23 -05:00
@setlocal
2013-12-30 17:41:15 -05:00
2019-12-31 15:56:23 -05:00
@echo usage:
@echo make
@echo make -CHM
2013-12-30 17:41:15 -05:00
2020-07-18 17:58:58 -04:00
:: Doxygen tool (adjust to your system) ......................................
@set DOXYGEN=doxygen
2013-12-30 17:41:15 -05:00
2020-07-18 17:58:58 -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:41:15 -05:00
2020-07-18 17:58:58 -04:00
:: Simple complexity metrics tool (adjust to your system) ...................
@set LIZARD=lizard
:: Generate metrics.dox file...
2020-03-17 21:33:58 -04:00
@set METRICS_INP=..\include ..\src -x ..\src\qs\*
@set METRICS_OUT=metrics.dox
2013-12-30 17:41:15 -05:00
2020-03-17 21:33:58 -04:00
@echo /** @page metrics Code Metrics > %METRICS_OUT%
@echo.>> %METRICS_OUT%
@echo @code{cpp} >> %METRICS_OUT%
@echo Code Metrics for QP/C++ >> %METRICS_OUT%
2013-12-30 17:41:15 -05:00
2020-03-17 21:33:58 -04:00
%LIZARD% -m -L500 -a10 -C20 -V %METRICS_INP% >> %METRICS_OUT%
2013-12-30 17:41:15 -05:00
2020-03-17 21:33:58 -04:00
@echo @endcode >> %METRICS_OUT%
@echo */ >> %METRICS_OUT%
2013-12-30 17:41:15 -05:00
2020-07-18 17:58:58 -04:00
:: Generate Doxygen Documentation...
2014-09-22 11:48:11 -04:00
if "%1"=="-CHM" (
2019-12-31 15:56:23 -05:00
@echo Generating HTML...
2020-07-18 17:58:58 -04:00
%DOXYGEN% Doxyfile-CHM
2015-05-14 16:05:04 -04:00
2019-12-31 15:56:23 -05:00
@echo Adding custom images...
2015-05-14 16:05:04 -04:00
xcopy preview.js tmp\
xcopy img tmp\img\
2019-12-31 15:56:23 -05:00
@echo img\img.htm >> tmp\index.hhp
2015-05-14 16:05:04 -04:00
2019-12-31 15:56:23 -05:00
@echo Generating CHM...
2020-07-18 17:58:58 -04:00
%HHC% tmp\index.hhp
2015-05-14 16:05:04 -04:00
2019-12-31 15:56:23 -05:00
@echo.
@echo Cleanup...
@rmdir /S /Q tmp
2020-07-18 17:58:58 -04:00
@echo CHM file generated
2014-09-22 11:48:11 -04:00
) else (
2019-12-31 15:56:23 -05:00
@echo.
@echo Cleanup...
2020-07-18 17:58:58 -04:00
rmdir /S /Q ..\html
2015-05-14 16:05:04 -04:00
2020-07-18 17:58:58 -04:00
@echo Adding custom images...
xcopy preview.js ..\html\
xcopy img ..\html\img\
copy images\favicon.ico ..\html
2015-05-14 16:05:04 -04:00
2019-12-31 15:56:23 -05:00
@echo Generating HTML...
2020-07-18 17:58:58 -04:00
%DOXYGEN% Doxyfile
@qclean ..\html
2014-09-22 11:48:11 -04:00
)
2013-12-30 17:41:15 -05:00
2019-12-31 15:56:23 -05:00
@endlocal