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