| [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
|
|---|
| 23 | if ! $CVS2CL 2> /dev/null ; then
|
|---|
| [e66be9a] | 24 | echo Failed to update ChangeLog from CVS
|
|---|
| 25 | exit 1
|
|---|
| 26 | fi
|
|---|
| [fd51dc3] | 27 | fi
|
|---|
| 28 | if test -f Makefile ; then
|
|---|
| 29 | if ! make distclean ; then
|
|---|
| 30 | echo make distclean failed
|
|---|
| 31 | exit 1
|
|---|
| 32 | fi
|
|---|
| 33 | fi
|
|---|
| [ae1309f] | 34 | if test x"$rel" = xyes ; then
|
|---|
| [38226ad] | 35 | rm -f config.guess.new config.sub.new
|
|---|
| [70bfbfd] | 36 | perl -e '-M "config.guess" && -M "config.sub" && exit 1' &&\
|
|---|
| 37 | wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
|
|---|
| [38226ad] | 38 | wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
|
|---|
| [9b3648d] | 39 | chmod 755 config.guess.new config.sub.new &&\
|
|---|
| [38226ad] | 40 | mv config.guess.new config.guess && mv config.sub.new config.sub
|
|---|
| [bd7120b] | 41 | fi
|
|---|
| [dc459c9] | 42 | aclocal
|
|---|
| 43 | autoheader
|
|---|
| 44 | automake -a
|
|---|
| 45 | autoconf
|
|---|
| [eea518c] | 46 | if ! ./configure ; then
|
|---|
| 47 | echo configure failed
|
|---|
| 48 | exit 1
|
|---|
| 49 | fi
|
|---|
| [f78ad72] | 50 | if test x"$rel" = xyes ; then
|
|---|
| 51 | if ! make distcheck ; then
|
|---|
| 52 | echo make distcheck failed
|
|---|
| 53 | exit 1
|
|---|
| 54 | fi
|
|---|
| 55 | else
|
|---|
| 56 | if ! make dist ; then
|
|---|
| 57 | echo make dist failed
|
|---|
| 58 | exit 1
|
|---|
| 59 | fi
|
|---|
| [e719df1] | 60 | fi
|
|---|
| [ae1309f] | 61 | if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
|
|---|
| [7eb8d4a] | 62 | if rpm --version > /dev/null 2> /dev/null ; then
|
|---|
| 63 | if ! make rpm ; then
|
|---|
| 64 | echo make rpm failed
|
|---|
| 65 | exit 1
|
|---|
| 66 | fi
|
|---|
| 67 | else
|
|---|
| 68 | echo rpm not installed - skipping rpm generation
|
|---|
| [e66be9a] | 69 | fi
|
|---|
| [f30265a0] | 70 | fi
|
|---|
| [ae1309f] | 71 | if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
|
|---|
| [9cfb427] | 72 | if ! make debian ; then
|
|---|
| [7eb8d4a] | 73 | echo make debian failed
|
|---|
| [9cfb427] | 74 | exit 1
|
|---|
| 75 | fi
|
|---|
| [f30265a0] | 76 | fi
|
|---|
| [ae1309f] | 77 | if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
|
|---|
| [e68fccf] | 78 | if ! make dos_doc_exe ; then
|
|---|
| 79 | echo make dos_doc_exe failed
|
|---|
| [e66be9a] | 80 | exit 1
|
|---|
| 81 | fi
|
|---|
| [21a0009] | 82 | if ! make riscos_doc_zip ; then
|
|---|
| 83 | echo make riscos_doc_zip failed
|
|---|
| 84 | exit 1
|
|---|
| 85 | fi
|
|---|
| [fd51dc3] | 86 | fi
|
|---|
| [ae1309f] | 87 | if expr "$mk" : '.*\<alien\>'; then
|
|---|
| [f30265a0] | 88 | if ! make alien_src_zip ; then
|
|---|
| 89 | echo make alien_src_zip failed
|
|---|
| 90 | exit 1
|
|---|
| 91 | fi
|
|---|
| [4208811] | 92 | fi
|
|---|
| [9324b2d] | 93 | if ! make distclean ; then
|
|---|
| 94 | echo make distclean failed
|
|---|
| 95 | exit 1
|
|---|
| 96 | fi
|
|---|
| [ae1309f] | 97 | if expr "$mk" : '.*\<djgpp\>'; then
|
|---|
| [f30265a0] | 98 | SAVE_PATH="$PATH"
|
|---|
| 99 | # for building on mrs30
|
|---|
| 100 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
|
|---|
| 101 | PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
|
|---|
| 102 | fi
|
|---|
| [9b3648d] | 103 | if ! ./configure --host=djgpp --with-x=no --disable-aven LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe CRLIB=-lalleg CROBJX=dosrot.o ; then
|
|---|
| [f30265a0] | 104 | echo djgpp configure failed
|
|---|
| 105 | exit 1
|
|---|
| 106 | fi
|
|---|
| 107 | if ! make ; then
|
|---|
| 108 | echo djgpp make failed
|
|---|
| 109 | exit 1
|
|---|
| 110 | fi
|
|---|
| [e68fccf] | 111 | if ! make djgpp_exe ; then
|
|---|
| 112 | echo djgpp make djgpp_exe failed
|
|---|
| [e66be9a] | 113 | exit 1
|
|---|
| 114 | fi
|
|---|
| [f30265a0] | 115 | if ! make distclean ; then
|
|---|
| 116 | echo make distclean failed
|
|---|
| 117 | exit 1
|
|---|
| 118 | fi
|
|---|
| 119 | PATH="$SAVE_PATH"
|
|---|
| [fd51dc3] | 120 | fi
|
|---|
| [ae1309f] | 121 | if expr "$mk" : '.*\<mingw\>'; then
|
|---|
| [9b3648d] | 122 | build_platform=`sh config.guess`
|
|---|
| [f30265a0] | 123 | SAVE_PATH="$PATH"
|
|---|
| 124 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
|
|---|
| 125 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
|
|---|
| 126 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
|
|---|
| [b0a751b4] | 127 | else
|
|---|
| [f30265a0] | 128 | if test -d /usr/i586-mingw32msvc/bin ; then
|
|---|
| 129 | # debian mingw32 package
|
|---|
| 130 | PATH=/usr/i586-mingw32msvc/bin:$PATH
|
|---|
| 131 | CC=/usr/bin/i586-mingw32msvc-gcc
|
|---|
| 132 | export CC
|
|---|
| 133 | CXX=/usr/bin/i586-mingw32msvc-g++
|
|---|
| 134 | export CXX
|
|---|
| 135 | else
|
|---|
| 136 | # variant of debian mingw32 package?
|
|---|
| 137 | PATH=/usr/i386-mingw32msvc/bin:$PATH
|
|---|
| 138 | CC=/usr/bin/i386-mingw32msvc-gcc
|
|---|
| 139 | export CC
|
|---|
| 140 | CXX=/usr/bin/i386-mingw32msvc-g++
|
|---|
| 141 | export CXX
|
|---|
| 142 | fi
|
|---|
| 143 | fi
|
|---|
| [9b3648d] | 144 | 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] | 145 | echo mingw configure failed
|
|---|
| 146 | exit 1
|
|---|
| 147 | fi
|
|---|
| 148 | if ! make ; then
|
|---|
| 149 | echo mingw make failed
|
|---|
| 150 | exit 1
|
|---|
| [b0a751b4] | 151 | fi
|
|---|
| [8f6f99b] | 152 | if ! make mingw_iss ; then
|
|---|
| 153 | echo mingw make mingw_iss failed
|
|---|
| [e66be9a] | 154 | exit 1
|
|---|
| 155 | fi
|
|---|
| [f30265a0] | 156 | if ! make distclean ; then
|
|---|
| 157 | echo make distclean failed
|
|---|
| 158 | exit 1
|
|---|
| 159 | fi
|
|---|
| 160 | PATH="$SAVE_PATH"
|
|---|
| 161 | CC=
|
|---|
| 162 | CXX=
|
|---|
| [e66be9a] | 163 | fi
|
|---|