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 | if ! ./configure ; then |
---|
28 | echo configure failed |
---|
29 | exit 1 |
---|
30 | fi |
---|
31 | # make distcheck fails - cvs version of automake doesn't clean up all the |
---|
32 | # files it creates... |
---|
33 | if ! make dist ; then |
---|
34 | echo make dist failed |
---|
35 | exit 1 |
---|
36 | fi |
---|
37 | if test x"$release" = xyes ; then |
---|
38 | if rpm --version > /dev/null 2> /dev/null ; then |
---|
39 | if ! make rpm ; then |
---|
40 | echo make rpm failed |
---|
41 | exit 1 |
---|
42 | fi |
---|
43 | else |
---|
44 | echo rpm not installed - skipping rpm generation |
---|
45 | fi |
---|
46 | if ! make debian ; then |
---|
47 | echo make debian failed |
---|
48 | exit 1 |
---|
49 | fi |
---|
50 | if ! make dos_doc_zip ; then |
---|
51 | echo make dos_doc_zip failed |
---|
52 | exit 1 |
---|
53 | fi |
---|
54 | fi |
---|
55 | if ! make alien_src_zip ; then |
---|
56 | echo make alien_src_zip failed |
---|
57 | exit 1 |
---|
58 | fi |
---|
59 | if ! make distclean ; then |
---|
60 | echo make distclean failed |
---|
61 | exit 1 |
---|
62 | fi |
---|
63 | ( |
---|
64 | # for building on mrs30 |
---|
65 | if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then |
---|
66 | PATH=/opt/crosstools/bin:$PATH |
---|
67 | fi |
---|
68 | if ! env CC=i386-pc-msdosdjgpp-gcc LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe \ |
---|
69 | CRLIB=-lalleg CROBJX=dosrot.o ./configure --with-x=no ; then |
---|
70 | echo djgpp configure failed |
---|
71 | exit 1 |
---|
72 | fi |
---|
73 | if ! make ; then |
---|
74 | echo djgpp make failed |
---|
75 | exit 1 |
---|
76 | fi |
---|
77 | #if test x"$release" = xyes ; then |
---|
78 | if ! make djgpp_zip ; then |
---|
79 | echo djgpp make djgpp_zip failed |
---|
80 | exit 1 |
---|
81 | fi |
---|
82 | #fi |
---|
83 | if ! make distclean ; then |
---|
84 | echo make distclean failed |
---|
85 | exit 1 |
---|
86 | fi |
---|
87 | ) |
---|
88 | ( |
---|
89 | if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then |
---|
90 | # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/ |
---|
91 | PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH |
---|
92 | else |
---|
93 | # debian mingw32 package |
---|
94 | PATH=/usr/i586-mingw32msvc/bin:$PATH |
---|
95 | fi |
---|
96 | # FIXME: is this all needed? |
---|
97 | if ! env LDFLAGS=-s CAVEROT= ./configure --with-x=no ; then |
---|
98 | echo mingw configure failed |
---|
99 | exit 1 |
---|
100 | fi |
---|
101 | if ! make ; then |
---|
102 | echo mingw make failed |
---|
103 | exit 1 |
---|
104 | fi |
---|
105 | #if test x"$release" = xyes ; then |
---|
106 | if ! make mingw_zip ; then |
---|
107 | echo mingw make mingw_zip failed |
---|
108 | exit 1 |
---|
109 | fi |
---|
110 | #fi |
---|
111 | if ! make distclean ; then |
---|
112 | echo make distclean failed |
---|
113 | exit 1 |
---|
114 | fi |
---|
115 | ) |
---|