#! /bin/sh set -e # 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 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 ./configure CC=gcc CXX=g++ 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= make distcheck CFLAGS= CXXFLAGS= else make dist fi case $mk in *doc*) make dos_doc_exe ;; esac make distclean 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' ./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" WX_CONFIG="$wxc" LDFLAGS=-s make CFLAGS=-Werror make mingw_iss make distclean PATH=$SAVE_PATH ;; esac