doc_makeall.sh.in 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. # -------------------------------------------------------------------------
  2. # Doxygen documentation batch
  3. # modified by S. Barre (Time-stamp: <2003-01-16 14:04:41 barre>
  4. # -------------------------------------------------------------------------
  5. # Path to several tools (_PROG to avoid the typical GZIP env var pb)
  6. # Example:
  7. # DOXYGEN_PROG=@DOXYGEN@ (INCLUDE(${CMAKE_ROOT}/Modules/FindDoxygen.cmake))
  8. # GZIP_PROG=@GZIP@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
  9. # HHC_PROG=@HHC@ (INCLUDE(${CMAKE_ROOT}/Modules/FindHhc.cmake))
  10. # MV_PROG=@MV@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
  11. # PERL_PROG=@PERL@ (INCLUDE(${CMAKE_ROOT}/Modules/FindPerl.cmake))
  12. # RM_PROG=@RM@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
  13. # TAR_PROG=@TAR@ (INCLUDE(${CMAKE_ROOT}/Modules/FindCygwin.cmake))
  14. # WGET_PROG=@WGET@ (INCLUDE(${CMAKE_ROOT}/Modules/FindWget.cmake))
  15. #
  16. export DOXYGEN_PROG="@DOXYGEN@" # Doxygen
  17. export GZIP_PROG="@GZIP@" # gzip (Unix-like 'gzip compressor')
  18. export GNUPLOT_PROG="@GNUPLOT@" # gnuplot (data plotting program)
  19. export HHC_PROG="@HTML_HELP_COMPILER@" # HTML Help Compiler
  20. export MV_PROG="@MV@" # mv (Unix-like 'move/rename files')
  21. export PERL_PROG="@PERL@" # Perl
  22. export RM_PROG="@RM@" # rm (Unix-like 'remove files')
  23. export TAR_PROG="@TAR@" # tar (Unix-like 'archiver')
  24. export WGET_PROG="@WGET@" # wget (remote file retrieval)
  25. # PROJECT_NAME:
  26. # Documentation/project name. Used in some of the resulting file names and
  27. # xrefs to uniquify two or more projects linked together through their
  28. # Doxygen's tag files. Mandatory for each documentation set.
  29. # Note: might be the same as the doxyfile's PROJECT_NAME
  30. # Example:
  31. # PROJECT_NAME=VTK
  32. #
  33. export PROJECT_NAME=CMake
  34. # PATH_TO_VTK_DOX_SCRIPTS:
  35. # Path to the directory holding the Perl scripts used to produce the VTK doc
  36. # in Doxygen format. You need the VTK source files or a local copy of
  37. # these scripts.
  38. # Example:
  39. # PATH_TO_VTK_DOX_SCRIPTS=@VTK_SOURCE_DIR@/Utilities/Doxygen
  40. #
  41. export PATH_TO_VTK_DOX_SCRIPTS="@VTK_SOURCE_DIR@/Utilities/Doxygen"
  42. # SOURCE_DIR:
  43. # Source directory. The top directory of the source files.
  44. # Example:
  45. # SOURCE_DIR=@VTK_SOURCE_DIR@
  46. #
  47. export SOURCE_DIR="@CMake_SOURCE_DIR@"
  48. # REL_PATH_TO_TOP:
  49. # Relative path from the top directory of the source files to the directory
  50. # (or top directory) holding the files to document. Useful if several parts
  51. # of the same source directory should be documented separately.
  52. # Example:
  53. # REL_PATH_TO_TOP=.
  54. # REL_PATH_TO_TOP=framework/src
  55. #
  56. # export REL_PATH_TO_TOP=Source
  57. export REL_PATH_TO_TOP=.
  58. # INTERMEDIATE_DOX_DIR:
  59. # Directory where the intermediate Doxygen files should be stored (mainly
  60. # these headers files converted from the VTK format to the Doxygen format).
  61. # This directory is erased at the end of this script, unless you comment
  62. # the corresponding line.
  63. # DOXTEMP might be used to simplify the syntax.
  64. # Example:
  65. # DOXTEMP=DOXTEMP=@VTK_BINARY_DIR@/Utilities/Doxygen
  66. # INTERMEDIATE_DOX_DIR=$DOXTEMP/dox
  67. #
  68. export DOXTEMP="@CMake_BINARY_DIR@/Utilities/Doxygen"
  69. export INTERMEDIATE_DOX_DIR="$DOXTEMP/dox"
  70. # DOXYFILE:
  71. # Path to the Doxygen configuration file (i.e. doxyfile).
  72. # Example:
  73. # DOXYFILE=$DOXTEMP/doxyfile
  74. #
  75. export DOXYFILE="$DOXTEMP/doxyfile"
  76. # OUTPUT_DIRECTORY ALLOW_ERASE_OUTPUT_DIRECTORY:
  77. # Path to the Doxygen output directory (where the resulting doc is stored).
  78. # Note: should be the same as your doxyfile's OUTPUT_DIRECTORY
  79. # If ON, allows the output directory to be erased when some advanced output
  80. # file have been produced (HTML Help, or TAR archive for example).
  81. # Example:
  82. # OUTPUT_DIRECTORY=$DOXTEMP/doc
  83. # ALLOW_ERASE_OUTPUT_DIRECTORY=ON
  84. #
  85. export OUTPUT_DIRECTORY="$DOXTEMP/doc"
  86. export ALLOW_ERASE_OUTPUT_DIRECTORY=ON
  87. # COMPILE_HTML_HELP RESULTING_HTML_HELP_FILE:
  88. # Compile the CHM (Compressed HTML) HTML Help file, name of the resulting
  89. # file. If set to ON and name is non-empty these options will actually
  90. # trigger the HTML-Help compiler to create the CHM. The resulting
  91. # file (usually index.chm) will be renamed to this name.
  92. # Note: if ON, the whole $OUTPUT_DIRECTORY will be erased at the end of
  93. # this script, since this file is considered to be one of the
  94. # advanced final output, unless ALLOW_ERASE_OUTPUT_DIRECTORY is OFF
  95. # Note: your doxyfile should be configured to enable HTML Help creation
  96. # (using GENERATE_HTML = YES, GENERATE_HTMLHELP = YES)
  97. # Example:
  98. # COMPILE_HTML_HELP=ON
  99. # COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@
  100. # RESULTING_HTML_HELP_FILE=$DOXTEMP/vtk4.chm
  101. #
  102. export COMPILE_HTML_HELP=@DOCUMENTATION_HTML_HELP@
  103. export RESULTING_HTML_HELP_FILE="$DOXTEMP/$PROJECT_NAME.chm"
  104. # CREATE_HTML_TARZ_ARCHIVE RESULTING_HTML_TARZ_ARCHIVE_FILE:
  105. # Create a compressed (gzip) tar archive of the html directory (located
  106. # under the OUTPUT_DIRECTORY), and name of the resulting archive file.
  107. # Note: your doxyfile should be configured to enable HTML creation
  108. # (using GENERATE_HTML = YES)
  109. # Example:
  110. # CREATE_HTML_TARZ_ARCHIVE=ON
  111. # CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@
  112. # RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/vtk4-html.tar.gz
  113. # RESULTING_HTML_TARZ_ARCHIVE_FILE=$DOXTEMP/$PROJECT_NAME-html.tar.gz
  114. #
  115. export CREATE_HTML_TARZ_ARCHIVE=@DOCUMENTATION_HTML_TARZ@
  116. export RESULTING_HTML_TARZ_ARCHIVE_FILE="$DOXTEMP/$PROJECT_NAME-html.tar.gz"
  117. # ----------------------------------------------------------------------------
  118. # Build the contributors list.
  119. if test "x@VTK_SOURCE_DIR@" != "x" ; then
  120. if test "x$PERL_PROG" != "xNOTFOUND" ; then
  121. $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_contributors.pl" \
  122. --authors "$SOURCE_DIR/Utilities/Doxygen/authors.txt" \
  123. --cachedir "$DOXTEMP/cache" \
  124. --class_group '^(cm[A-Z0-9][A-Za-z0-9]+)\.(?:c|cpp|cxx|h|fl)$' \
  125. --files_in '(?:^hints|dummy|README|^Makefile\.borland|\.(?:c|cmake|cpp|cxx|h|html|in|java|fl|pl|py|tcl|txt))$' \
  126. --files_out '(?:^ChangeLog\.txt)$' \
  127. --gnuplot_file "$DOXTEMP/contrib/history.plt" \
  128. --history_img "|lines|$DOXTEMP/contrib/history.png" \
  129. --history_img "365|lines|$DOXTEMP/contrib/history2y.png" \
  130. --history_img "180|linespoints|$DOXTEMP/contrib/history6m.png" \
  131. --history_dir "$DOXTEMP/contrib" \
  132. --history_max_nb 10 \
  133. --lines_add 1.0 \
  134. --lines_rem 0.5 \
  135. --massive 50 \
  136. --max_class_nb 10 \
  137. --max_file_nb 5 \
  138. --min_class 0.02 \
  139. --min_file 0.01 \
  140. --min_contrib 0.05 \
  141. --min_gcontrib 0.0001 \
  142. --store "doc_""$PROJECT_NAME""_contributors.dox" \
  143. --relativeto "$SOURCE_DIR/$REL_PATH_TO_TOP" \
  144. --to "$INTERMEDIATE_DOX_DIR" \
  145. "$SOURCE_DIR/$REL_PATH_TO_TOP"
  146. fi
  147. if test "x$GNUPLOT_PROG" != "xNOTFOUND" ; then
  148. $GNUPLOT_PROG "$DOXTEMP/contrib/history.plt"
  149. fi
  150. fi
  151. # ----------------------------------------------------------------------------
  152. # Create the Doxygen doc.
  153. if test "x$DOXYGEN_PROG" != "xNOTFOUND" ; then
  154. if test "x$RM_PROG" != "xNOTFOUND" ; then
  155. $RM_PROG -fr "$OUTPUT_DIRECTORY"
  156. fi
  157. "$DOXYGEN_PROG" "$DOXYFILE"
  158. # yes, a second time, to get the contrib, I don't know why
  159. "$DOXYGEN_PROG" "$DOXYFILE"
  160. fi
  161. # ----------------------------------------------------------------------------
  162. # Clean the HTML pages to remove the path to the intermediate Doxygen dir.
  163. if test "x@VTK_SOURCE_DIR@" != "x" ; then
  164. if test "x$PERL_PROG" != "xNOTFOUND" ; then
  165. $PERL_PROG "$PATH_TO_VTK_DOX_SCRIPTS/doc_rmpath.pl" \
  166. --verbose \
  167. --to "$INTERMEDIATE_DOX_DIR" \
  168. --html "$OUTPUT_DIRECTORY/html"
  169. fi
  170. fi
  171. # ----------------------------------------------------------------------------
  172. # Create the CHM HTML HELP doc.
  173. if test "x$COMPILE_HTML_HELP" == "xON" ; then
  174. if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then
  175. cd $OUTPUT_DIRECTORY/html
  176. if test "x$HHC_PROG" != "xNOTFOUND" ; then
  177. "$HHC_PROG" index.hhp
  178. if test "x$MV_PROG" != "xNOTFOUND" ; then
  179. $MV_PROG -f index.chm "$RESULTING_HTML_HELP_FILE"
  180. fi
  181. fi
  182. fi
  183. fi
  184. # ----------------------------------------------------------------------------
  185. # Create the compressed tar archive.
  186. if test "x$CREATE_HTML_TARZ_ARCHIVE" == "xON" ; then
  187. if test "x$RESULTING_HTML_TARZ_ARCHIVE_FILE" != "x" ; then
  188. cd "$OUTPUT_DIRECTORY"
  189. if test "x$TAR_PROG" != "xNOTFOUND" ; then
  190. if test "x$RM_PROG" != "xNOTFOUND" ; then
  191. $RM_PROG -f html.tar
  192. fi
  193. $TAR_PROG -cf html.tar html
  194. if test "x$GZIP_PROG" != "xNOTFOUND" ; then
  195. if test "x$RM_PROG" != "xNOTFOUND" ; then
  196. $RM_PROG -f html.tar.gz
  197. fi
  198. $GZIP_PROG html.tar
  199. $MV_PROG -f html.tar.gz "$RESULTING_HTML_TARZ_ARCHIVE_FILE"
  200. fi
  201. fi
  202. fi
  203. fi
  204. # ----------------------------------------------------------------------------
  205. # Clean-up.
  206. if test "x$RM_PROG" != "xNOTFOUND" ; then
  207. $RM_PROG -fr "$INTERMEDIATE_DOX_DIR"
  208. if test "x$DOWNLOAD_VTK_TAGFILE" == "xON" ; then
  209. if test "x$VTK_TAGFILE" != "x" ; then
  210. $RM_PROG -f "$VTK_TAGFILE_DEST_DIR/$VTK_TAGFILE"
  211. fi
  212. fi
  213. if test "x$COMPILE_HTML_HELP" == "xON" ; then
  214. if test "x$RESULTING_HTML_HELP_FILE" != "x" ; then
  215. if test "x$ALLOW_ERASE_OUTPUT_DIRECTORY" == "xON" ; then
  216. $RM_PROG -fr "$OUTPUT_DIRECTORY"
  217. fi
  218. fi
  219. fi
  220. fi