#! /bin/sh # Needed for wine to run on roadkill: LD_ASSUME_KERNEL=2.4.1 export LD_ASSUME_KERNEL 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 deb doc mingw} if test x"$rel" = xyes ; then # Update debian changelog entry if necessary # If it does get updated, then the next check will fail... dch -v"$VERSION-1" "New upstream release." || true # 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 dist ; 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" = xdeb ; then if ! make debian ; then echo make debian failed exit 1 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/local/cross-tools/i386-mingw32msvc/bin ; then # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/ PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH else 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 fi wxc=wxmsw-2.5-config for a in /usr/i586-mingw32msvc/bin/wx-config ; do test -x "$a" && wxc="$a" done LDFLAGS= CPPFLAGS= #if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$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