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