#! /bin/sh # 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 if ! ./configure CC=gcc CXX=g++ ; 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 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 ; then case $mk in *rpm*) 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 ;; esac case $mk in *doc*) if ! make dos_doc_exe ; then echo make dos_doc_exe failed exit 1 fi ;; esac fi if ! make distclean ; then echo make distclean failed exit 1 fi case $mk in *mingw*) 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 CXX=/usr/bin/i586-mingw32msvc-g++ else # variant of debian mingw32 package? PATH=/usr/i386-mingw32msvc/bin:$PATH CC=/usr/bin/i386-mingw32msvc-gcc CXX=/usr/bin/i386-mingw32msvc-g++ fi wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8 # -Werror here causes AC_CHECK_FUNCS to fail. CFLAGS= CXXFLAGS='-fno-strict-aliasing -Werror' if ! ./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" WX_CONFIG="$wxc" LDFLAGS=-s ; then echo mingw configure failed exit 1 fi if ! make CFLAGS=-Werror ; 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" ;; esac