]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/doxygen/regen.sh
compilation fix for ANSI build
[wxWidgets.git] / docs / doxygen / regen.sh
... / ...
CommitLineData
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
19me=$(basename $0)
20path=${0%%/$me} # path from which the script has been launched
21current=$(pwd)
22cd $path
23
24# prepare folders for the cp commands below
25mkdir -p out/html # we need to copy files in this folder below
26mkdir -p out/html/wxmsw out/html/wxgtk out/html/wxmac
27
28# These are not automatically copied by Doxygen because they're not
29# used in doxygen documentation, only in our html footer and by our
30# custom aliases
31cp images/powered-by-wxwidgets.png out/html
32cp images/*logo.png out/html
33cp images/wxmsw/*png out/html/wxmsw
34cp images/wxmac/*png out/html/wxmac
35cp images/wxgtk/*png out/html/wxgtk
36cp wxwidgets.js out/html
37
38# this CSS is not automatically copied by Doxygen because it's
39# included by our custom html header...
40cp wxwidgets.css out/html
41
42# which configuration should we use?
43if [[ -z "$1" ]]; then
44 cfgfile="Doxyfile_all"
45else
46 cfgfile="Doxyfile_$1"
47fi
48
49#
50# NOW RUN DOXYGEN
51#
52# NB: we do this _after_ copying the required files to the output folders
53# otherwise when generating the CHM file with Doxygen, those files are
54# not included!
55#
56doxygen $cfgfile
57
58# Doxygen has the annoying habit to put the full path of the
59# affected files in the log file; remove it to make the log
60# more readable
61currpath=`pwd`/
62interfacepath=`cd ../../interface && pwd`/
63cat doxygen.log | sed -e "s|$currpath||g" -e "s|$interfacepath||g" >temp
64
65# Doxygen warnings are not completely sorted for filename; enforce correct sorting:
66cat temp | sort >doxygen.log
67rm temp
68
69# return to the original folder from which this script was launched
70cd $current