| 1 | #! /bin/sh |
|---|
| 2 | release=yes |
|---|
| 3 | if test x"$1" = x-t ; then |
|---|
| 4 | release= |
|---|
| 5 | fi |
|---|
| 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 |
|---|
| 12 | CVS2CL=./cvs2cl.pl |
|---|
| 13 | if ! test -x $CVS2CL ; then |
|---|
| 14 | CVS2CL=../cvs2cl/cvs2cl.pl |
|---|
| 15 | fi |
|---|
| 16 | if ! $CVS2CL 2> /dev/null ; then |
|---|
| 17 | echo Failed to update ChangeLog from CVS |
|---|
| 18 | exit 1 |
|---|
| 19 | fi |
|---|
| 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 |
|---|
| 27 | aclocal |
|---|
| 28 | autoheader |
|---|
| 29 | automake -a |
|---|
| 30 | autoconf |
|---|
| 31 | if ! ./configure ; then |
|---|
| 32 | echo configure failed |
|---|
| 33 | exit 1 |
|---|
| 34 | fi |
|---|
| 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 |
|---|
| 39 | exit 1 |
|---|
| 40 | fi |
|---|
| 41 | if test x"$release" = xyes ; then |
|---|
| 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 |
|---|
| 49 | fi |
|---|
| 50 | if ! make debian ; then |
|---|
| 51 | echo make debian failed |
|---|
| 52 | exit 1 |
|---|
| 53 | fi |
|---|
| 54 | if ! make dos_doc_zip ; then |
|---|
| 55 | echo make dos_doc_zip failed |
|---|
| 56 | exit 1 |
|---|
| 57 | fi |
|---|
| 58 | fi |
|---|
| 59 | if ! make alien_src_zip ; then |
|---|
| 60 | echo make alien_src_zip failed |
|---|
| 61 | exit 1 |
|---|
| 62 | fi |
|---|
| 63 | if ! make distclean ; then |
|---|
| 64 | echo make distclean failed |
|---|
| 65 | exit 1 |
|---|
| 66 | fi |
|---|
| 67 | SAVE_PATH="$PATH" |
|---|
| 68 | # for building on mrs30 |
|---|
| 69 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then |
|---|
| 70 | PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH |
|---|
| 71 | fi |
|---|
| 72 | if ! env LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe \ |
|---|
| 73 | CRLIB=-lalleg CROBJX=dosrot.o ./configure --with-x=no --disable-aven; then |
|---|
| 74 | echo djgpp configure failed |
|---|
| 75 | exit 1 |
|---|
| 76 | fi |
|---|
| 77 | if ! make ; then |
|---|
| 78 | echo djgpp make failed |
|---|
| 79 | exit 1 |
|---|
| 80 | fi |
|---|
| 81 | #if test x"$release" = xyes ; then |
|---|
| 82 | if ! make djgpp_zip ; then |
|---|
| 83 | echo djgpp make djgpp_zip failed |
|---|
| 84 | exit 1 |
|---|
| 85 | fi |
|---|
| 86 | #fi |
|---|
| 87 | if ! make distclean ; then |
|---|
| 88 | echo make distclean failed |
|---|
| 89 | exit 1 |
|---|
| 90 | fi |
|---|
| 91 | PATH="$SAVE_PATH" |
|---|
| 92 | SAVE_PATH="$PATH" |
|---|
| 93 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then |
|---|
| 94 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/ |
|---|
| 95 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH |
|---|
| 96 | else |
|---|
| 97 | if test -d /usr/i586-mingw32msvc/bin ; then |
|---|
| 98 | # debian mingw32 package |
|---|
| 99 | PATH=/usr/i586-mingw32msvc/bin:$PATH |
|---|
| 100 | CC=/usr/bin/i586-mingw32msvc-gcc |
|---|
| 101 | export CC |
|---|
| 102 | CXX=/usr/bin/i586-mingw32msvc-g++ |
|---|
| 103 | export CXX |
|---|
| 104 | else |
|---|
| 105 | # variant of debian mingw32 package? |
|---|
| 106 | PATH=/usr/i386-mingw32msvc/bin:$PATH |
|---|
| 107 | CC=/usr/bin/i386-mingw32msvc-gcc |
|---|
| 108 | export CC |
|---|
| 109 | CXX=/usr/bin/i386-mingw32msvc-g++ |
|---|
| 110 | export CXX |
|---|
| 111 | fi |
|---|
| 112 | fi |
|---|
| 113 | if ! env LDFLAGS=-s CAVEROT= ./configure --with-x=no ; then |
|---|
| 114 | echo mingw configure failed |
|---|
| 115 | exit 1 |
|---|
| 116 | fi |
|---|
| 117 | if ! make ; then |
|---|
| 118 | echo mingw make failed |
|---|
| 119 | exit 1 |
|---|
| 120 | fi |
|---|
| 121 | #if test x"$release" = xyes ; then |
|---|
| 122 | if ! make mingw_zip ; then |
|---|
| 123 | echo mingw make mingw_zip failed |
|---|
| 124 | exit 1 |
|---|
| 125 | fi |
|---|
| 126 | #fi |
|---|
| 127 | if ! make distclean ; then |
|---|
| 128 | echo make distclean failed |
|---|
| 129 | exit 1 |
|---|
| 130 | fi |
|---|
| 131 | PATH="$SAVE_PATH" |
|---|
| 132 | CC= |
|---|
| 133 | CXX= |
|---|
| 134 | |
|---|
| 135 | |
|---|