X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03d4f7b9924d9fa767411b8fccd3607ce962275d..3f7564f229450a9c036141878ee75cc09078a945:/utils/ifacecheck/rungccxml.sh.in?ds=inline diff --git a/utils/ifacecheck/rungccxml.sh.in b/utils/ifacecheck/rungccxml.sh.in index c18eae5ae9..c933d4dffc 100755 --- a/utils/ifacecheck/rungccxml.sh.in +++ b/utils/ifacecheck/rungccxml.sh.in @@ -31,10 +31,9 @@ if [[ ! -z "$1" ]]; then fi me=$(basename $0) -path=${0%%/$me} -current=$(pwd) # current path +current=$(pwd)/${0%%/$me} # current path -#gccxmloutput="$current/$gccxmloutput" +gccxmloutput="$current/$gccxmloutput" cd @top_srcdir@/include # go to wx include folder @@ -44,13 +43,16 @@ headerlist=`$listcmd | grep -v wxshl | grep -v wx_cw | grep -v setup | grep -v x cd $current # return to the original path # create the header file to pass to gccxml +echo "Creating the $allheaders dummy file which #includes all wxWidgets interface header files..." 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@" +wx_top_builddir="@wx_top_builddir@" +top_srcdir="@top_srcdir@" +flags="@CPPFLAGS@ @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. @@ -64,11 +66,19 @@ flags="-I . -I @top_srcdir@/include $flags -D__WXDEBUG__ -D__WX@TOOLKIT@__ -DWXB echo "Running gccxml on the $allheaders file... results in $gccxmloutput" if [[ -f "$gccxmloutput" ]]; then rm $gccxmloutput; fi gccxml $flags -fxml=$gccxmloutput +if [[ $? != 0 ]]; then + echo "Errors running gccxml... aborting." + exit +fi # now get the list of the #defined values for wx headers, so that the result # can be passed to ifacecheck to aid the comparison echo "Running gccxml's preprocessor on the $allheaders file... results in $preprocoutput" gccxml -E -dM $flags >$preprocoutput +if [[ $? != 0 ]]; then + echo "Errors running gccxml preprocessor... aborting." + exit +fi # cleanup rm $allheaders