Updated doxygen launcher scripts to reflect new Doxyfile locations.
[wxWidgets.git] / docs / doxygen / regen.sh
1 #!/bin/bash
2 #
3 # $Id$
4 #
5 # This bash script regenerates the HTML doxygen version of the
6 # wxWidgets manual and adjusts the doxygen log to make it more
7 # readable.
8 #
9 # Usage:
10 # ./regen.sh [html|chm|xml|latex|all]
11 #
12 # Pass "x" to regen only the X output format and "all" to regen them all.
13 # If no arguments are passed all formats are regenerated
14 # (just like passing "all").
15 #
16
17
18 # remember current folder and then cd to the docs/doxygen one
19 me=$(basename $0)
20 path=${0%%/$me} # path from which the script has been launched
21 current=$(pwd)
22 cd $path
23
24 # prepare folders for the cp commands below
25 mkdir -p out/html # we need to copy files in this folder below
26 mkdir -p out/html/wxmsw out/html/wxgtk out/html/wxmac
27
28 # these images are not automatically copied by Doxygen because they're not
29 # used in doxygen documentation but only in our html footer and by our
30 # custom aliases
31 cp images/powered-by-wxwidgets.png out/html
32 cp images/*logo.png out/html
33 cp images/wxmsw/*png out/html/wxmsw
34 cp images/wxmac/*png out/html/wxmac
35 cp images/wxgtk/*png out/html/wxgtk
36
37 # this CSS is not automatically copied by Doxygen because it's
38 # included by our custom html header...
39 cp wxwidgets.css out/html
40
41 # which configuration should we use?
42 if [[ -z "$1" ]]; then
43 cfgfile="Doxyfile_all"
44 else
45 cfgfile="Doxyfile_$1"
46 fi
47
48 #
49 # NOW RUN DOXYGEN
50 #
51 # NB: we do this _after_ copying the required files to the output folders
52 # otherwise when generating the CHM file with Doxygen, those files are
53 # not included!
54 #
55 doxygen $cfgfile
56
57 # Doxygen has the annoying habit to put the full path of the
58 # affected files in the log file; remove it to make the log
59 # more readable
60 currpath=`pwd`/
61 interfacepath=`cd ../../interface && pwd`/
62 cat doxygen.log | sed -e "s|$currpath||g" -e "s|$interfacepath||g" >temp
63 mv temp doxygen.log
64
65 # filter out the following warning which we don't care about
66 #cat doxygen.log | grep -v ".*supplied.*as.*the.*argument.*is.*not.*an.*input.*file.*" >temp
67 #mv temp doxygen.log
68
69 cd $current