[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 |
---|
[6d316f1] | 98 | build_platform=`sh config.guess` |
---|
[f30265a0] | 99 | SAVE_PATH="$PATH" |
---|
| 100 | # for building on mrs30 |
---|
| 101 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then |
---|
| 102 | PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH |
---|
| 103 | fi |
---|
[6d316f1] | 104 | 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] | 105 | echo djgpp configure failed |
---|
| 106 | exit 1 |
---|
| 107 | fi |
---|
| 108 | if ! make ; then |
---|
| 109 | echo djgpp make failed |
---|
| 110 | exit 1 |
---|
| 111 | fi |
---|
[e68fccf] | 112 | if ! make djgpp_exe ; then |
---|
| 113 | echo djgpp make djgpp_exe failed |
---|
[e66be9a] | 114 | exit 1 |
---|
| 115 | fi |
---|
[f30265a0] | 116 | if ! make distclean ; then |
---|
| 117 | echo make distclean failed |
---|
| 118 | exit 1 |
---|
| 119 | fi |
---|
| 120 | PATH="$SAVE_PATH" |
---|
[fd51dc3] | 121 | fi |
---|
[ae1309f] | 122 | if expr "$mk" : '.*\<mingw\>'; then |
---|
[6d316f1] | 123 | test -n "$build_platform" || build_platform=`sh config.guess` |
---|
[f30265a0] | 124 | SAVE_PATH="$PATH" |
---|
| 125 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then |
---|
| 126 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/ |
---|
| 127 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH |
---|
[b0a751b4] | 128 | else |
---|
[f30265a0] | 129 | if test -d /usr/i586-mingw32msvc/bin ; then |
---|
| 130 | # debian mingw32 package |
---|
| 131 | PATH=/usr/i586-mingw32msvc/bin:$PATH |
---|
| 132 | CC=/usr/bin/i586-mingw32msvc-gcc |
---|
| 133 | export CC |
---|
| 134 | CXX=/usr/bin/i586-mingw32msvc-g++ |
---|
| 135 | export CXX |
---|
| 136 | else |
---|
| 137 | # variant of debian mingw32 package? |
---|
| 138 | PATH=/usr/i386-mingw32msvc/bin:$PATH |
---|
| 139 | CC=/usr/bin/i386-mingw32msvc-gcc |
---|
| 140 | export CC |
---|
| 141 | CXX=/usr/bin/i386-mingw32msvc-g++ |
---|
| 142 | export CXX |
---|
| 143 | fi |
---|
| 144 | fi |
---|
[6d316f1] | 145 | 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] | 146 | echo mingw configure failed |
---|
| 147 | exit 1 |
---|
| 148 | fi |
---|
| 149 | if ! make ; then |
---|
| 150 | echo mingw make failed |
---|
| 151 | exit 1 |
---|
[b0a751b4] | 152 | fi |
---|
[8f6f99b] | 153 | if ! make mingw_iss ; then |
---|
| 154 | echo mingw make mingw_iss failed |
---|
[e66be9a] | 155 | exit 1 |
---|
| 156 | fi |
---|
[f30265a0] | 157 | if ! make distclean ; then |
---|
| 158 | echo make distclean failed |
---|
| 159 | exit 1 |
---|
| 160 | fi |
---|
| 161 | PATH="$SAVE_PATH" |
---|
| 162 | CC= |
---|
| 163 | CXX= |
---|
[e66be9a] | 164 | fi |
---|