#! /bin/sh VERSION="@VERSION@" # flags to consider: # CFLAGS="-O2 -fomit-frame-pointer" # CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer" rel=yes if test x"$1" = x-t ; then rel= shift fi mk=${@-src rpm doc mingw} if test x"$rel" = xyes ; then # Check everything is checked into SVN. if svn st | grep -v '^?' | grep . > /dev/null 2> /dev/null ; then echo There are changes not checked into SVN - please rectify exit 1 fi fi if test -f Makefile ; then if ! make distclean ; then echo make distclean failed exit 1 fi fi if test yes = "$rel" ; then cp -u /usr/share/misc/config.guess . cp -u /usr/share/misc/config.sub . fi autoreconf --force -i export CC export CXX CC=gcc CXX=g++ if ! ./configure ; then echo configure failed exit 1 fi if test yes = "$rel" ; then export CFLAGS export CXXFLAGS # tell the preproceesor to be C89 - this makes it reject // comments # FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89" # FIXME CXXFLAGS="-Werror" CFLAGS="-Wp,-std=c89" CXXFLAGS= if ! make distcheck ; then # distcheck fails extend.tst for some reason! echo make distcheck failed exit 1 fi CFLAGS= CXXFLAGS= else if ! make dist ; then echo make dist failed exit 1 fi fi if test x"$rel" = xyes && expr "$mk" : '.*\' || test x"$mk" = xrpm ; then if rpmbuild --version > /dev/null 2> /dev/null ; then if ! make rpm ; then echo make rpm failed exit 1 fi else echo rpmbuild not installed - skipping rpm generation fi fi if test x"$rel" = xyes && expr "$mk" : '.*\' || test x"$mk" = xdoc ; then if ! make dos_doc_exe ; then echo make dos_doc_exe failed exit 1 fi fi if ! make distclean ; then echo make distclean failed exit 1 fi unset CC unset CXX if expr "$mk" : '.*\'; then test -n "$build_platform" || build_platform=`sh config.guess` SAVE_PATH="$PATH" if test -d /usr/i586-mingw32msvc/bin ; then # debian mingw32 package PATH=/usr/i586-mingw32msvc/bin:$PATH CC=/usr/bin/i586-mingw32msvc-gcc export CC CXX=/usr/bin/i586-mingw32msvc-g++ export CXX else # variant of debian mingw32 package? PATH=/usr/i386-mingw32msvc/bin:$PATH CC=/usr/bin/i386-mingw32msvc-gcc export CC CXX=/usr/bin/i386-mingw32msvc-g++ export CXX fi wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-ansi-release-static-2.8 LDFLAGS= CPPFLAGS= # CFLAGS=-Werror CXXFLAGS=-Werror if ! ./configure --host=mingw32 --build="$build_platform" WX_CONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; then echo mingw configure failed exit 1 fi if ! make ; then echo mingw make failed exit 1 fi if ! make mingw_iss ; then echo mingw make mingw_iss failed exit 1 fi if ! make distclean ; then echo make distclean failed exit 1 fi PATH="$SAVE_PATH" CC= CXX= fi