| [d7acd89] | 1 | #! /bin/sh
|
|---|
| [e66be9a] | 2 | release=yes
|
|---|
| 3 | if test x"$1" = x-t ; then
|
|---|
| 4 | release=
|
|---|
| [d7acd89] | 5 | fi
|
|---|
| [e66be9a] | 6 | if test x"$release" = xyes ; then
|
|---|
| 7 | if ! cvs diff > /dev/null 2> /dev/null ; then
|
|---|
| 8 | echo There are changes not checked into CVS - please rectify
|
|---|
| 9 | exit 1
|
|---|
| 10 | fi
|
|---|
| 11 | # Update ChangeLog
|
|---|
| [bfa0e10] | 12 | CVS2CL=./cvs2cl.pl
|
|---|
| 13 | if ! test -x $CVS2CL ; then
|
|---|
| 14 | CVS2CL=../cvs2cl/cvs2cl.pl
|
|---|
| 15 | fi
|
|---|
| 16 | if ! $CVS2CL 2> /dev/null ; then
|
|---|
| [e66be9a] | 17 | echo Failed to update ChangeLog from CVS
|
|---|
| 18 | exit 1
|
|---|
| 19 | fi
|
|---|
| [fd51dc3] | 20 | fi
|
|---|
| 21 | if test -f Makefile ; then
|
|---|
| 22 | if ! make distclean ; then
|
|---|
| 23 | echo make distclean failed
|
|---|
| 24 | exit 1
|
|---|
| 25 | fi
|
|---|
| 26 | fi
|
|---|
| [dc459c9] | 27 | aclocal
|
|---|
| 28 | autoheader
|
|---|
| 29 | automake -a
|
|---|
| 30 | autoconf
|
|---|
| [eea518c] | 31 | if ! ./configure ; then
|
|---|
| 32 | echo configure failed
|
|---|
| 33 | exit 1
|
|---|
| 34 | fi
|
|---|
| [c693a3f] | 35 | # make distcheck fails - cvs version of automake doesn't clean up all the
|
|---|
| 36 | # files it creates...
|
|---|
| 37 | if ! make dist ; then
|
|---|
| 38 | echo make dist failed
|
|---|
| [e719df1] | 39 | exit 1
|
|---|
| 40 | fi
|
|---|
| [e66be9a] | 41 | if test x"$release" = xyes ; then
|
|---|
| [7eb8d4a] | 42 | if rpm --version > /dev/null 2> /dev/null ; then
|
|---|
| 43 | if ! make rpm ; then
|
|---|
| 44 | echo make rpm failed
|
|---|
| 45 | exit 1
|
|---|
| 46 | fi
|
|---|
| 47 | else
|
|---|
| 48 | echo rpm not installed - skipping rpm generation
|
|---|
| [e66be9a] | 49 | fi
|
|---|
| [9cfb427] | 50 | if ! make debian ; then
|
|---|
| [7eb8d4a] | 51 | echo make debian failed
|
|---|
| [9cfb427] | 52 | exit 1
|
|---|
| 53 | fi
|
|---|
| [e66be9a] | 54 | if ! make dos_doc_zip ; then
|
|---|
| 55 | echo make dos_doc_zip failed
|
|---|
| 56 | exit 1
|
|---|
| 57 | fi
|
|---|
| [21a0009] | 58 | if ! make riscos_doc_zip ; then
|
|---|
| 59 | echo make riscos_doc_zip failed
|
|---|
| 60 | exit 1
|
|---|
| 61 | fi
|
|---|
| [fd51dc3] | 62 | fi
|
|---|
| [4208811] | 63 | if ! make alien_src_zip ; then
|
|---|
| 64 | echo make alien_src_zip failed
|
|---|
| 65 | exit 1
|
|---|
| 66 | fi
|
|---|
| [9324b2d] | 67 | if ! make distclean ; then
|
|---|
| 68 | echo make distclean failed
|
|---|
| 69 | exit 1
|
|---|
| 70 | fi
|
|---|
| [7ecb7db] | 71 | SAVE_PATH="$PATH"
|
|---|
| [6e25b46c] | 72 | # for building on mrs30
|
|---|
| 73 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
|
|---|
| [bfd7d71] | 74 | PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
|
|---|
| [6e25b46c] | 75 | fi
|
|---|
| [7a62dce] | 76 | if ! env LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe \
|
|---|
| [d162ed06] | 77 | CRLIB=-lalleg CROBJX=dosrot.o ./configure --with-x=no --disable-aven; then
|
|---|
| [fd51dc3] | 78 | echo djgpp configure failed
|
|---|
| 79 | exit 1
|
|---|
| 80 | fi
|
|---|
| [e66be9a] | 81 | if ! make ; then
|
|---|
| [fd51dc3] | 82 | echo djgpp make failed
|
|---|
| 83 | exit 1
|
|---|
| 84 | fi
|
|---|
| [4208811] | 85 | #if test x"$release" = xyes ; then
|
|---|
| [e66be9a] | 86 | if ! make djgpp_zip ; then
|
|---|
| 87 | echo djgpp make djgpp_zip failed
|
|---|
| 88 | exit 1
|
|---|
| 89 | fi
|
|---|
| [4208811] | 90 | #fi
|
|---|
| [fd51dc3] | 91 | if ! make distclean ; then
|
|---|
| 92 | echo make distclean failed
|
|---|
| 93 | exit 1
|
|---|
| 94 | fi
|
|---|
| [7ecb7db] | 95 | PATH="$SAVE_PATH"
|
|---|
| 96 | SAVE_PATH="$PATH"
|
|---|
| [6e25b46c] | 97 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
|
|---|
| 98 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
|
|---|
| 99 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
|
|---|
| 100 | else
|
|---|
| [b0a751b4] | 101 | if test -d /usr/i586-mingw32msvc/bin ; then
|
|---|
| 102 | # debian mingw32 package
|
|---|
| 103 | PATH=/usr/i586-mingw32msvc/bin:$PATH
|
|---|
| 104 | CC=/usr/bin/i586-mingw32msvc-gcc
|
|---|
| 105 | export CC
|
|---|
| 106 | CXX=/usr/bin/i586-mingw32msvc-g++
|
|---|
| 107 | export CXX
|
|---|
| 108 | else
|
|---|
| 109 | # variant of debian mingw32 package?
|
|---|
| 110 | PATH=/usr/i386-mingw32msvc/bin:$PATH
|
|---|
| 111 | CC=/usr/bin/i386-mingw32msvc-gcc
|
|---|
| 112 | export CC
|
|---|
| 113 | CXX=/usr/bin/i386-mingw32msvc-g++
|
|---|
| 114 | export CXX
|
|---|
| 115 | fi
|
|---|
| [6e25b46c] | 116 | fi
|
|---|
| 117 | if ! env LDFLAGS=-s CAVEROT= ./configure --with-x=no ; then
|
|---|
| [fd51dc3] | 118 | echo mingw configure failed
|
|---|
| 119 | exit 1
|
|---|
| 120 | fi
|
|---|
| [e66be9a] | 121 | if ! make ; then
|
|---|
| [fd51dc3] | 122 | echo mingw make failed
|
|---|
| 123 | exit 1
|
|---|
| 124 | fi
|
|---|
| [4208811] | 125 | #if test x"$release" = xyes ; then
|
|---|
| [8f6f99b] | 126 | if ! make mingw_iss ; then
|
|---|
| 127 | echo mingw make mingw_iss failed
|
|---|
| [e66be9a] | 128 | exit 1
|
|---|
| 129 | fi
|
|---|
| [4208811] | 130 | #fi
|
|---|
| [e66be9a] | 131 | if ! make distclean ; then
|
|---|
| 132 | echo make distclean failed
|
|---|
| 133 | exit 1
|
|---|
| 134 | fi
|
|---|
| [7ecb7db] | 135 | PATH="$SAVE_PATH"
|
|---|
| 136 | CC=
|
|---|
| 137 | CXX=
|
|---|
| 138 |
|
|---|
| 139 |
|
|---|