make it callable from any path
[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 me=$(basename $0)
10 path=${0%%/$me} # path from which the script has been launched
11 current=$(pwd)
12 cd $path
13
14 mkdir -p out/html # we need to copy files in this folder below
15 mkdir -p out/html/wxmsw out/html/wxgtk out/html/wxmac
16
17 # this image is not automatically copied by Doxygen because it's not
18 # used in doxygen documentation but only in our html footer...
19 cp images/powered-by-wxwidgets.png out/html
20 cp images/*logo.png out/html
21 cp images/wxmsw/*png out/html/wxmsw
22 cp images/wxmac/*png out/html/wxmac
23 cp images/wxgtk/*png out/html/wxgtk
24
25 # this CSS is automatically copied by Doxygen because it's
26 # included by our custom html header...
27 cp wxwidgets.css out/html
28
29 #
30 # NOW RUN DOXYGEN
31 #
32 # NB: we do this _after_ copying the required files to the output folders
33 # otherwise when generating the CHM file with Doxygen, those files are
34 # not included!
35 #
36 if [[ -z "$1" ]]; then
37 cfgfile="Doxyfile.all"
38 else
39 cfgfile="Doxyfile.$1"
40 fi
41
42 doxygen $cfgfile
43
44 # Doxygen has the annoying habit to put the full path of the
45 # affected files in the log file; remove it to make the log
46 # more readable
47 currpath=`pwd`/
48 interfacepath=`cd ../../interface && pwd`/
49 cat doxygen.log | sed -e "s|$currpath||g" -e "s|$interfacepath||g" >temp
50 mv temp doxygen.log
51
52 # filter out the following warning which we don't care about
53 #cat doxygen.log | grep -v ".*supplied.*as.*the.*argument.*is.*not.*an.*input.*file.*" >temp
54 #mv temp doxygen.log
55
56 cd $current