[d7acd89] | 1 | #! /bin/sh |
---|
[ae1309f] | 2 | |
---|
[0333b3b] | 3 | set -e |
---|
[ea03343] | 4 | |
---|
[bbca0fd] | 5 | # flags to consider: |
---|
| 6 | # CFLAGS="-O2 -fomit-frame-pointer" |
---|
| 7 | # CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer" |
---|
[ae1309f] | 8 | rel=yes |
---|
[e66be9a] | 9 | if test x"$1" = x-t ; then |
---|
[ae1309f] | 10 | rel= |
---|
[f30265a0] | 11 | shift |
---|
[d7acd89] | 12 | fi |
---|
[0333b3b] | 13 | |
---|
[ae1309f] | 14 | if test x"$rel" = xyes ; then |
---|
[0333b3b] | 15 | # Check everything is checked into SVN. |
---|
| 16 | if svn st | grep -v '^?' | grep . > /dev/null 2> /dev/null ; then |
---|
| 17 | echo There are changes not checked into SVN - please rectify |
---|
[fd51dc3] | 18 | exit 1 |
---|
| 19 | fi |
---|
| 20 | fi |
---|
[0333b3b] | 21 | |
---|
| 22 | test ! -f Makefile || make distclean |
---|
| 23 | |
---|
[1a924269] | 24 | if test yes = "$rel" ; then |
---|
[0333b3b] | 25 | cp -u /usr/share/misc/config.guess . |
---|
| 26 | cp -u /usr/share/misc/config.sub . |
---|
[bd7120b] | 27 | fi |
---|
[0333b3b] | 28 | |
---|
[b92fa73] | 29 | autoreconf --force -i |
---|
[0333b3b] | 30 | ./configure CC=gcc CXX=g++ |
---|
[1a924269] | 31 | if test yes = "$rel" ; then |
---|
[0333b3b] | 32 | export CFLAGS |
---|
| 33 | export CXXFLAGS |
---|
| 34 | # tell the preproceesor to be C89 - this makes it reject // comments |
---|
| 35 | # FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89" |
---|
| 36 | # FIXME CXXFLAGS="-Werror" |
---|
| 37 | CFLAGS="-Wp,-std=c89" |
---|
| 38 | CXXFLAGS= |
---|
| 39 | make distcheck |
---|
| 40 | CFLAGS= |
---|
| 41 | CXXFLAGS= |
---|
[f78ad72] | 42 | else |
---|
[0333b3b] | 43 | make dist |
---|
[fd51dc3] | 44 | fi |
---|
[0333b3b] | 45 | |
---|
| 46 | make distclean |
---|
| 47 | |
---|
| 48 | test -n "$build_platform" || build_platform=`sh config.guess` |
---|
| 49 | SAVE_PATH=$PATH |
---|
| 50 | if test -d /usr/i586-mingw32msvc/bin ; then |
---|
| 51 | # debian mingw32 package |
---|
| 52 | PATH=/usr/i586-mingw32msvc/bin:$PATH |
---|
| 53 | CC=/usr/bin/i586-mingw32msvc-gcc |
---|
| 54 | CXX=/usr/bin/i586-mingw32msvc-g++ |
---|
| 55 | else |
---|
| 56 | # variant of debian mingw32 package? |
---|
| 57 | PATH=/usr/i386-mingw32msvc/bin:$PATH |
---|
| 58 | CC=/usr/bin/i386-mingw32msvc-gcc |
---|
| 59 | CXX=/usr/bin/i386-mingw32msvc-g++ |
---|
[e66be9a] | 60 | fi |
---|
[0333b3b] | 61 | wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-ansi-release-static-2.8 |
---|
| 62 | # -Werror here causes AC_CHECK_FUNCS to fail. |
---|
| 63 | CFLAGS= |
---|
| 64 | CXXFLAGS='-fno-strict-aliasing -Werror' |
---|
| 65 | ./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" WX_CONFIG="$wxc" LDFLAGS=-s |
---|
| 66 | make CFLAGS=-Werror |
---|
| 67 | make mingw_iss |
---|
| 68 | PATH=$SAVE_PATH |
---|
| 69 | |
---|
| 70 | make distclean |
---|