added the rungccxml.sh script and the setup_gccxml.h file to make it easier to generate the gccxml output for ifacecheck

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-03-26 16:40:54 +00:00
parent 29f571de5c
commit 2f46438b36
7 changed files with 1241 additions and 4 deletions

7
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in 51895 2008-02-18 22:50:15Z DE .
# From configure.in Id: configure.in 52015 2008-02-22 22:27:39Z RD .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
#
@@ -50147,6 +50147,9 @@ ac_config_files="$ac_config_files lib/wx/config/${TOOLCHAIN_FULLNAME}:wx-config.
ac_config_files="$ac_config_files lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.in"
ac_config_files="$ac_config_files utils/ifacecheck/rungccxml.sh"
if test "$wx_cv_version_script" = "yes"; then
ac_config_files="$ac_config_files version-script"
@@ -50917,6 +50920,7 @@ do
"rcdefs.h") CONFIG_COMMANDS="$CONFIG_COMMANDS rcdefs.h" ;;
"lib/wx/config/${TOOLCHAIN_FULLNAME}") CONFIG_FILES="$CONFIG_FILES lib/wx/config/${TOOLCHAIN_FULLNAME}:wx-config.in" ;;
"lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}") CONFIG_FILES="$CONFIG_FILES lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.in" ;;
"utils/ifacecheck/rungccxml.sh") CONFIG_FILES="$CONFIG_FILES utils/ifacecheck/rungccxml.sh" ;;
"version-script") CONFIG_FILES="$CONFIG_FILES version-script" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"wx-config") CONFIG_COMMANDS="$CONFIG_COMMANDS wx-config" ;;
@@ -51956,6 +51960,7 @@ echo "$as_me: executing $ac_file commands" >&6;}
;;
"lib/wx/config/${TOOLCHAIN_FULLNAME}":F) chmod +x lib/wx/config/${TOOLCHAIN_FULLNAME} ;;
"lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}":F) chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ;;
"utils/ifacecheck/rungccxml.sh":F) chmod +x utils/ifacecheck/rungccxml.sh ;;
"wx-config":C) rm -f wx-config
${LN_S} lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} wx-config
;;

View File

@@ -7846,6 +7846,11 @@ AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace.
[ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ],
[ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
dnl this is used to run ifacecheck with the same flags used by the compiler
dnl for the real compilation:
AC_CONFIG_FILES([ utils/ifacecheck/rungccxml.sh ],
[ chmod +x utils/ifacecheck/rungccxml.sh ])
if test "$wx_cv_version_script" = "yes"; then
AC_CONFIG_FILES(version-script)
fi

View File

@@ -211,7 +211,15 @@
Note that it must be included before defining hardware symbols below as they
could be already defined by configure
*/
#include "wx/setup.h"
#ifdef __GCCXML__
/*
we're using gccxml to create an XML representation of the entire
wxWidgets interface; pass it a special setup.h file
*/
#include "wx/setup_gccxml.h"
#else
#include "wx/setup.h"
#endif
/*
Hardware platform detection.

1154
include/wx/setup_gccxml.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,65 @@
#!/bin/bash
# $Id$
#
# Runs gccxml on the wxWidgets include folder, in order to build the XML
# file to fetch to ifacecheck to check the coherency of the wxWidgets
# interface headers with the "real" ones.
## CONSTANTS
############
gccxmloutput="wxapi.xml" # where do we put the gccXML output:
allheaders="/tmp/wx-all.h" # headers which includes all wx public headers
# the list of all wxWidgets public headers
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"
## MAIN
#######
if [[ ! -z "$1" ]]; then
echo "This script does not accept arguments."
echo "Usage: $0"
echo "Creates a '$gccxmloutput' file which you can pass to ifacecheck."
exit 1
fi
me=$(basename $0)
path=${0%%/$me}
current=$(pwd) # current path
gccxmloutput="$current/$gccxmloutput"
cd @top_srcdir@/include # go to wx include folder
# now filter it
headerlist=`$listcmd | grep -v wxshl | grep -v wx_cw | grep -v setup | grep -v xti | grep -v dde.h | grep -v fmappriv`
cd $current # return to the original path
# create the header file to pass to gccxml
if [[ -f $allheaders ]]; then rm $allheaders; fi
for f in $headerlist; do
echo "#include <$f>" >> $allheaders
done
# filter the configure flags to pass to gccxml
flags="@CXXFLAGS@"
# NOTE: it's important to define __WXDEBUG__ because some functions of wx
# are declared (and thus parsed by gcc) only if that symbol is defined;
# so we remove __WXDEBUG__ symbol from $flags, in case it's defined:
flags=`echo "$flags" | sed -e 's/-pthread//g' | sed -e 's/__WXDEBUG__//g'`
# run gccxml with the same flag used for the real compilation of wx sources:
echo "Running gccxml on the $allheaders file..."
if [[ -f "$gccxmloutput" ]]; then rm $gccxmloutput; fi
gccxml -I . -I @top_srcdir@/include $flags -D__WX@TOOLKIT@__ -DWXBUILDING $allheaders -fxml=$gccxmloutput
# cleanup
rm $allheaders