make.bat 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @echo off
  2. :: ==========================================================================
  3. :: Product: QP/C script for generating Doxygen documentation
  4. :: Last Updated for Version: 5.4.2
  5. :: Date of the Last Update: 2015-06-03
  6. ::
  7. :: Q u a n t u m L e a P s
  8. :: ---------------------------
  9. :: innovating embedded systems
  10. ::
  11. :: Copyright (C) Quantum Leaps, LLC. All rights reserved.
  12. ::
  13. :: This program is open source software: you can redistribute it and/or
  14. :: modify it under the terms of the GNU General Public License as published
  15. :: by the Free Software Foundation, either version 3 of the License, or
  16. :: (at your option) any later version.
  17. ::
  18. :: Alternatively, this program may be distributed and modified under the
  19. :: terms of Quantum Leaps commercial licenses, which expressly supersede
  20. :: the GNU General Public License and are specifically designed for
  21. :: licensees interested in retaining the proprietary status of their code.
  22. ::
  23. :: This program is distributed in the hope that it will be useful,
  24. :: but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. :: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  26. :: GNU General Public License for more details.
  27. ::
  28. :: You should have received a copy of the GNU General Public License
  29. :: along with this program. If not, see <http://www.gnu.org/licenses/>.
  30. ::
  31. :: Contact information:
  32. :: Web: http://www.state-machine.com
  33. :: Email: info@state-machine.com
  34. :: ==========================================================================
  35. setlocal
  36. echo usage:
  37. echo make
  38. echo make -CHM
  39. set VERSION=5.4.2
  40. :: Generate Resource Standard Metrics for QP/C ...............................
  41. set DOXHOME="C:\tools\doxygen\bin"
  42. set RCMHOME="C:\tools\MSquared\M2 RSM"
  43. set RSM_OUTPUT=metrics.dox
  44. set RSM_INPUT=..\include\*.h ..\source\*.h ..\source\*.c
  45. echo /** @page metrics Code Metrics > %RSM_OUTPUT%
  46. echo.>> %RSM_OUTPUT%
  47. echo @code >> %RSM_OUTPUT%
  48. echo Standard Code Metrics for QP/C %VERSION% >> %RSM_OUTPUT%
  49. %RCMHOME%\rsm.exe -fd -xNOCOMMAND -xNOCONFIG -u"File cfg rsm_qpc.cfg" %RSM_INPUT% >> %RSM_OUTPUT%
  50. echo @endcode >> %RSM_OUTPUT%
  51. echo */ >> %RSM_OUTPUT%
  52. :: Generate Doxygen Documentation ...........................................
  53. if "%1"=="-CHM" (
  54. echo Generating HTML...
  55. ::( type Doxyfile & echo GENERATE_HTMLHELP=YES ) | %DOXHOME%\doxygen.exe -
  56. %DOXHOME%\doxygen.exe Doxyfile-CHM
  57. echo Adding custom images...
  58. xcopy preview.js tmp\
  59. xcopy img tmp\img\
  60. echo img\img.htm >> tmp\index.hhp
  61. echo Generate CHM...
  62. "C:\tools\HTML Help Workshop\hhc.exe" tmp\index.hhp
  63. echo Cleanup...
  64. rmdir /S /Q tmp
  65. echo CHM file generated in ..\doc\
  66. ) else (
  67. echo Cleanup...
  68. rmdir /S /Q ..\..\doc\qpc
  69. echo Adding custom images...
  70. xcopy preview.js ..\..\doc\qpc\
  71. xcopy img ..\..\doc\qpc\img\
  72. copy images\favicon.ico ..\..\doc\qpc
  73. echo Generating HTML...
  74. %DOXHOME%\doxygen.exe Doxyfile
  75. )
  76. endlocal