5 # Runs gccxml on the wxWidgets include folder, in order to build the XML
6 # file to fetch to ifacecheck to check the coherency of the wxWidgets
7 # interface headers with the "real" ones.
14 gccxmloutput
="wxapi.xml" # where do we put the gccXML output:
15 allheaders
="/tmp/wx-all.h" # headers which includes all wx public headers
17 # the list of all wxWidgets public headers
18 listcmd
="ls wx/*.h wx/aui/*.h wx/html/*.h wx/protocol/*.h wx/richtext/*.h wx/stc/*.h wx/xml/*.h wx/xrc/*.h"
25 if [[ ! -z
"$1" ]]; then
26 echo "This script does not accept arguments."
28 echo "Creates a '$gccxmloutput' file which you can pass to ifacecheck."
34 current
=$
(pwd) # current path
36 gccxmloutput
="$current/$gccxmloutput"
38 cd @top_srcdir@
/include
# go to wx include folder
41 headerlist
=`$listcmd | grep -v wxshl | grep -v wx_cw | grep -v setup | grep -v xti | grep -v dde.h | grep -v fmappriv`
43 cd $current # return to the original path
45 # create the header file to pass to gccxml
46 if [[ -f
$allheaders ]]; then rm $allheaders; fi
47 for f
in $headerlist; do
48 echo "#include <$f>" >> $allheaders
51 # filter the configure flags to pass to gccxml
54 # NOTE: it's important to define __WXDEBUG__ because some functions of wx
55 # are declared (and thus parsed by gcc) only if that symbol is defined;
56 # so we remove __WXDEBUG__ symbol from $flags, in case it's defined:
57 flags
=`echo "$flags" | sed -e 's/-pthread//g' | sed -e 's/__WXDEBUG__//g'`
59 # run gccxml with the same flag used for the real compilation of wx sources:
60 echo "Running gccxml on the $allheaders file..."
61 if [[ -f
"$gccxmloutput" ]]; then rm $gccxmloutput; fi
62 gccxml
-I .
-I @top_srcdir@
/include
$flags -D__WX@TOOLKIT@__
-DWXBUILDING
$allheaders -fxml
=$gccxmloutput