3 # Shell script to make doxygen documentation by specifying a target directory
6 # Gef (gefdavis@dingoblue.net.au) -- August 2001
9 # - Dynamic ChangeLog (page gets updated with each commit)
10 # - Have the ability to specify server dox or local dox, which will then
11 # change the content on the main page
12 # - Incorporate a scaled gtkradiant splash image into the pages
14 #------------------------------------------------------------------------
16 #------------------------------------------------------------------------
20 EXTRAS_PATH="./Doxygen_files";
21 CONFIG_OUTPUT="$EXTRAS_PATH/genConf";
22 DOXYCONFIG="./DoxyConfig";
23 DOXYFILE="$EXTRAS_PATH/Doxyfile";
24 NEWDOXYFILE="$EXTRAS_PATH/genDoxyfile";
25 declare -a TARGETLIST[$#];
29 # added -k command line option to kill running doxygen procs
32 #------------------------------------------------------------------------
34 #------------------------------------------------------------------------
35 if [ -f "$EXTRAS_PATH/gendoxfunctions" ] ; then
36 . $EXTRAS_PATH/gendoxfunctions
38 echo -e "Missing critical files...\n";
42 #------------------------------------------------------------------------
43 # parse the command line options
44 #------------------------------------------------------------------------
48 if [ $RETVAL -gt 0 ] ; then
54 if [ $KILLON -gt 0 ] ; then
55 PIDOF_DOXYGEN=`pidof -x doxygen`
58 if [ -z "$PIDOF_DOXYGEN" ] ; then
59 [ $QUIETMODE -gt 0 ] || echo -e " * Killing other doxygen pids";
62 [ $QUIETMODE -gt 0 ] || echo -e " * Killing other doxygen pids";
63 kill -9 $PIDOF_DOXYGEN &> /dev/null
66 [ $QUIETMODE -gt 0 ] || echo -e " * Cleaning up gendox pids";
67 killall -q -9 `pidof -x gendox | sed -e s/$MYPID//` &> /dev/null
71 # If the output dir hasn't been set yet...
72 #if [ -z "$OUTPUTDIR" ] ; then
73 # OUTPUTDIR="../$(basename `pwd`)-doxygen";
76 #------------------------------------------------------------------------
77 # execute some functions to determine stuff(c)
78 # Get the perl path (either from the config file, or find it)
79 #------------------------------------------------------------------------
81 if [ X"$PERLPATH" == "X" ] ; then
82 echo -e "\nError: A working install of perl is needed to use doxygen";
85 [ $QUIETMODE -gt 0 ] || echo -e " -> Set PERL_PATH to: $PERLPATH";
88 [ $QUIETMODE -gt 0 ] || echo -e " -> Set HAVE_DOT to: $HAVEDOT";
89 if [ X"$HAVEDOT" == "XYes" ] ; then
90 [ $QUIETMODE -gt 0 ] || echo -e " -> Set DOT_PATH to: $DOTPATH";
94 [ $QUIETMODE -gt 0 ] || echo -e " -> Set OUTPUT_LANGUAGE to: $OUPUTLANGUAGE";
97 [ $QUIETMODE -gt 0 ] || echo -e " -> Set PROJECT_NAME to: $PROJECTNAME";
100 [ $QUIETMODE -gt 0 ] || echo -e " -> Set PROJECT_NUMBER to: $VERSION";
101 #------------------------------------------------------------------------
102 # Got everything we need, now write the DoxyConfig file and run doxygen
103 #------------------------------------------------------------------------
108 # Put the images & reference pages in the right place
110 if [ $RETVAL -ge 666 ] ; then
114 # Generate the config file
116 if [ $RETVAL -gt 0 ] ; then
117 echo -e "Error: You are missing critical files."
121 # build the reference page and the index
124 # Generate documentation
127 if [ $RETVAL -gt 0 ] ; then
128 echo -e "Doxygen error: returned $RETVAL";
129 echo -e " Check doxygen.log for details";
130 elif [ $RETVAL -lt 0 ] ; then
131 echo -e "Doxygen error: Doxygen returned $RETVAL";
134 # if the log file is empty, remove it
135 if [ ! -s ./doxygen.log ] ; then
139 #------------------------------------------------------------------------
141 #------------------------------------------------------------------------
142 [ $QUIETMODE -gt 0 ] || echo -e "Finished...";
143 [ $QUIETMODE -gt 0 ] || echo -e "Duration: $SECONDS seconds\n";
145 # echo -e "** Removing output while in debug mode **";
146 # echo -e "** Output dir: $OUTPUTDIR **\n";