| [d7acd89] | 1 | #! /bin/sh
|
|---|
| [ae1309f] | 2 |
|
|---|
| 3 | rel=yes
|
|---|
| [e66be9a] | 4 | if test x"$1" = x-t ; then
|
|---|
| [ae1309f] | 5 | rel=
|
|---|
| [f30265a0] | 6 | shift
|
|---|
| [d7acd89] | 7 | fi
|
|---|
| [ae1309f] | 8 | mk=${@-src rpm deb doc alien djgpp mingw}
|
|---|
| 9 | if test x"$rel" = xyes ; then
|
|---|
| [f6a3719] | 10 | # Update debian changelog entry if necessary
|
|---|
| 11 | # If it does get updated, then the next check will fail...
|
|---|
| 12 | ./update-debcl.pl
|
|---|
| 13 | # Check everything is checked into CVS
|
|---|
| [e66be9a] | 14 | if ! cvs diff > /dev/null 2> /dev/null ; then
|
|---|
| 15 | echo There are changes not checked into CVS - please rectify
|
|---|
| 16 | exit 1
|
|---|
| 17 | fi
|
|---|
| 18 | # Update ChangeLog
|
|---|
| [bfa0e10] | 19 | CVS2CL=./cvs2cl.pl
|
|---|
| 20 | if ! test -x $CVS2CL ; then
|
|---|
| 21 | CVS2CL=../cvs2cl/cvs2cl.pl
|
|---|
| 22 | fi
|
|---|
| [a20b208] | 23 | TAG="`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`"
|
|---|
| 24 | if ! cvs log $TAG|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
|
|---|
| [e66be9a] | 25 | echo Failed to update ChangeLog from CVS
|
|---|
| 26 | exit 1
|
|---|
| 27 | fi
|
|---|
| [fd51dc3] | 28 | fi
|
|---|
| 29 | if test -f Makefile ; then
|
|---|
| 30 | if ! make distclean ; then
|
|---|
| 31 | echo make distclean failed
|
|---|
| 32 | exit 1
|
|---|
| 33 | fi
|
|---|
| 34 | fi
|
|---|
| [ae1309f] | 35 | if test x"$rel" = xyes ; then
|
|---|
| [38226ad] | 36 | rm -f config.guess.new config.sub.new
|
|---|
| [70bfbfd] | 37 | perl -e '-M "config.guess" && -M "config.sub" && exit 1' &&\
|
|---|
| 38 | wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
|
|---|
| [38226ad] | 39 | wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
|
|---|
| [9b3648d] | 40 | chmod 755 config.guess.new config.sub.new &&\
|
|---|
| [38226ad] | 41 | mv config.guess.new config.guess && mv config.sub.new config.sub
|
|---|
| [bd7120b] | 42 | fi
|
|---|
| [dc459c9] | 43 | aclocal
|
|---|
| 44 | autoheader
|
|---|
| 45 | automake -a
|
|---|
| 46 | autoconf
|
|---|
| [eea518c] | 47 | if ! ./configure ; then
|
|---|
| 48 | echo configure failed
|
|---|
| 49 | exit 1
|
|---|
| 50 | fi
|
|---|
| [f78ad72] | 51 | if test x"$rel" = xyes ; then
|
|---|
| 52 | if ! make distcheck ; then
|
|---|
| 53 | echo make distcheck failed
|
|---|
| 54 | exit 1
|
|---|
| 55 | fi
|
|---|
| 56 | else
|
|---|
| 57 | if ! make dist ; then
|
|---|
| 58 | echo make dist failed
|
|---|
| 59 | exit 1
|
|---|
| 60 | fi
|
|---|
| [e719df1] | 61 | fi
|
|---|
| [ae1309f] | 62 | if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
|
|---|
| [7eb8d4a] | 63 | if rpm --version > /dev/null 2> /dev/null ; then
|
|---|
| 64 | if ! make rpm ; then
|
|---|
| 65 | echo make rpm failed
|
|---|
| 66 | exit 1
|
|---|
| 67 | fi
|
|---|
| 68 | else
|
|---|
| 69 | echo rpm not installed - skipping rpm generation
|
|---|
| [e66be9a] | 70 | fi
|
|---|
| [f30265a0] | 71 | fi
|
|---|
| [ae1309f] | 72 | if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
|
|---|
| [9cfb427] | 73 | if ! make debian ; then
|
|---|
| [7eb8d4a] | 74 | echo make debian failed
|
|---|
| [9cfb427] | 75 | exit 1
|
|---|
| 76 | fi
|
|---|
| [f30265a0] | 77 | fi
|
|---|
| [ae1309f] | 78 | if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
|
|---|
| [e68fccf] | 79 | if ! make dos_doc_exe ; then
|
|---|
| 80 | echo make dos_doc_exe failed
|
|---|
| [e66be9a] | 81 | exit 1
|
|---|
| 82 | fi
|
|---|
| [21a0009] | 83 | if ! make riscos_doc_zip ; then
|
|---|
| 84 | echo make riscos_doc_zip failed
|
|---|
| 85 | exit 1
|
|---|
| 86 | fi
|
|---|
| [fd51dc3] | 87 | fi
|
|---|
| [ae1309f] | 88 | if expr "$mk" : '.*\<alien\>'; then
|
|---|
| [f30265a0] | 89 | if ! make alien_src_zip ; then
|
|---|
| 90 | echo make alien_src_zip failed
|
|---|
| 91 | exit 1
|
|---|
| 92 | fi
|
|---|
| [4208811] | 93 | fi
|
|---|
| [9324b2d] | 94 | if ! make distclean ; then
|
|---|
| 95 | echo make distclean failed
|
|---|
| 96 | exit 1
|
|---|
| 97 | fi
|
|---|
| [ae1309f] | 98 | if expr "$mk" : '.*\<djgpp\>'; then
|
|---|
| [6d316f1] | 99 | build_platform=`sh config.guess`
|
|---|
| [f30265a0] | 100 | SAVE_PATH="$PATH"
|
|---|
| 101 | # for building on mrs30
|
|---|
| 102 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
|
|---|
| 103 | PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
|
|---|
| 104 | fi
|
|---|
| [6d316f1] | 105 | if ! ./configure --host=i386-pc-msdosdjgpp --build="$build_platform" --with-x=no --disable-aven LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe CRLIB=-lalleg CROBJX=dosrot.o ; then
|
|---|
| [f30265a0] | 106 | echo djgpp configure failed
|
|---|
| 107 | exit 1
|
|---|
| 108 | fi
|
|---|
| 109 | if ! make ; then
|
|---|
| 110 | echo djgpp make failed
|
|---|
| 111 | exit 1
|
|---|
| 112 | fi
|
|---|
| [e68fccf] | 113 | if ! make djgpp_exe ; then
|
|---|
| 114 | echo djgpp make djgpp_exe failed
|
|---|
| [e66be9a] | 115 | exit 1
|
|---|
| 116 | fi
|
|---|
| [f30265a0] | 117 | if ! make distclean ; then
|
|---|
| 118 | echo make distclean failed
|
|---|
| 119 | exit 1
|
|---|
| 120 | fi
|
|---|
| 121 | PATH="$SAVE_PATH"
|
|---|
| [fd51dc3] | 122 | fi
|
|---|
| [ae1309f] | 123 | if expr "$mk" : '.*\<mingw\>'; then
|
|---|
| [6d316f1] | 124 | test -n "$build_platform" || build_platform=`sh config.guess`
|
|---|
| [f30265a0] | 125 | SAVE_PATH="$PATH"
|
|---|
| 126 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
|
|---|
| 127 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
|
|---|
| 128 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
|
|---|
| [b0a751b4] | 129 | else
|
|---|
| [f30265a0] | 130 | if test -d /usr/i586-mingw32msvc/bin ; then
|
|---|
| 131 | # debian mingw32 package
|
|---|
| 132 | PATH=/usr/i586-mingw32msvc/bin:$PATH
|
|---|
| 133 | CC=/usr/bin/i586-mingw32msvc-gcc
|
|---|
| 134 | export CC
|
|---|
| 135 | CXX=/usr/bin/i586-mingw32msvc-g++
|
|---|
| 136 | export CXX
|
|---|
| 137 | else
|
|---|
| 138 | # variant of debian mingw32 package?
|
|---|
| 139 | PATH=/usr/i386-mingw32msvc/bin:$PATH
|
|---|
| 140 | CC=/usr/bin/i386-mingw32msvc-gcc
|
|---|
| 141 | export CC
|
|---|
| 142 | CXX=/usr/bin/i386-mingw32msvc-g++
|
|---|
| 143 | export CXX
|
|---|
| 144 | fi
|
|---|
| 145 | fi
|
|---|
| [6d316f1] | 146 | if ! ./configure --host=mingw32 --build="$build_platform" --with-x=no WXCONFIG=`pwd`/mingw_extras/wxmsw-config LDFLAGS="-s -L/opt/rx-win32/lib" CPPFLAGS=-I/opt/rx-win32/include CAVEROT= ; then
|
|---|
| [f30265a0] | 147 | echo mingw configure failed
|
|---|
| 148 | exit 1
|
|---|
| 149 | fi
|
|---|
| 150 | if ! make ; then
|
|---|
| 151 | echo mingw make failed
|
|---|
| 152 | exit 1
|
|---|
| [b0a751b4] | 153 | fi
|
|---|
| [8f6f99b] | 154 | if ! make mingw_iss ; then
|
|---|
| 155 | echo mingw make mingw_iss failed
|
|---|
| [e66be9a] | 156 | exit 1
|
|---|
| 157 | fi
|
|---|
| [f30265a0] | 158 | if ! make distclean ; then
|
|---|
| 159 | echo make distclean failed
|
|---|
| 160 | exit 1
|
|---|
| 161 | fi
|
|---|
| 162 | PATH="$SAVE_PATH"
|
|---|
| 163 | CC=
|
|---|
| 164 | CXX=
|
|---|
| [e66be9a] | 165 | fi
|
|---|