source: git/make_release @ 9edf0e4

v1.0.34
Last change on this file since 9edf0e4 was bc610ce, checked in by Olly Betts <olly@…>, 20 years ago

Move -Werror for cross-builds machinery into configure.in. It's cleaner that
way and avoids problems with configure thinking mingw doesn't have strftime.

Also automatically pass -Wp,-std=c89 to gcc to catch comments in C code.

git-svn-id: file:///home/survex-svn/survex/trunk@2793 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 5.0 KB
Line 
1#! /bin/sh
2
3# flags to consider:
4# CFLAGS="-O2 -fomit-frame-pointer"
5# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
6rel=yes
7if test x"$1" = x-t ; then
8   rel=
9   shift
10fi
11mk=${@-src rpm deb doc alien djgpp mingw}
12if test x"$rel" = xyes ; then
13   # Update debian changelog entry if necessary
14   # If it does get updated, then the next check will fail...
15   ./update-debcl.pl
16   # Check everything is checked into CVS
17   if ! cvs diff > /dev/null 2> /dev/null ; then
18      echo There are changes not checked into CVS - please rectify
19      exit 1
20   fi
21   # Update ChangeLog
22   CVS2CL=./cvs2cl.pl
23   if ! test -x $CVS2CL ; then
24      CVS2CL=../cvs2cl/cvs2cl.pl
25   fi
26   if ! test -x $CVS2CL ; then
27      echo cvs2cl.pl not found
28      exit 1
29   fi
30   TAG="`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`"
31   # stderr | grep -v '^cvs server: warning: no revision .*/Attic/'
32   if ! cvs log -r$TAG:: 2> /dev/null|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
33      echo Failed to update ChangeLog from CVS
34      exit 1
35   fi
36fi
37if test -f Makefile ; then
38   if ! make distclean ; then
39      echo make distclean failed
40      exit 1
41   fi
42fi
43if test yes = "$rel" ; then
44   rm -f config.guess.new config.sub.new
45   # only check for new versions if the current ones are over a day old
46   perl -e '-M "config.guess" && -M "config.sub" && exit 1' ||\
47      wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
48      wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
49      chmod 755 config.guess.new config.sub.new &&\
50      mv config.guess.new config.guess && mv config.sub.new config.sub
51fi
52autoreconf --force -i
53export CC
54export CXX
55CC=gcc
56CXX=g++
57if ! ./configure ; then
58   echo configure failed
59   exit 1
60fi
61if test yes = "$rel" ; then
62   if ! make dist ; then # distcheck fails extend.tst for some reason!
63      echo make distcheck failed
64      exit 1
65   fi
66else
67   if ! make dist ; then
68      echo make dist failed
69      exit 1
70   fi
71fi
72if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
73   if rpm --version > /dev/null 2> /dev/null ; then
74      if ! make rpm ; then
75         echo make rpm failed
76         exit 1
77       fi
78   else
79       echo rpm not installed - skipping rpm generation
80   fi
81fi
82if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
83   if ! make debian ; then
84      echo make debian failed
85      exit 1
86   fi
87fi
88if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
89   if ! make dos_doc_exe ; then
90      echo make dos_doc_exe failed
91      exit 1
92   fi
93   if ! make riscos_doc_zip ; then
94      echo make riscos_doc_zip failed
95      exit 1
96   fi
97fi
98if expr "$mk" : '.*\<alien\>'; then
99   if ! make alien_src_zip ; then
100      echo make alien_src_zip failed
101      exit 1
102   fi
103fi
104if ! make distclean ; then
105   echo make distclean failed
106   exit 1
107fi
108unset CC
109unset CXX
110if expr "$mk" : '.*\<djgpp\>'; then
111   build_platform=`sh config.guess`
112   SAVE_PATH="$PATH"
113   # for building on mrs30
114   if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
115      PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
116   fi
117   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
118      echo djgpp configure failed
119      exit 1
120   fi
121   if ! make ; then
122      echo djgpp make failed
123      exit 1
124   fi
125   if ! make djgpp_exe ; then
126      echo djgpp make djgpp_exe failed
127      exit 1
128   fi
129   if ! make distclean ; then
130      echo make distclean failed
131      exit 1
132   fi
133   PATH="$SAVE_PATH"
134fi
135if expr "$mk" : '.*\<mingw\>'; then
136   test -n "$build_platform" || build_platform=`sh config.guess`
137   SAVE_PATH="$PATH"
138   if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
139      # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
140      PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
141   else
142      if test -d /usr/i586-mingw32msvc/bin ; then
143         # debian mingw32 package
144         PATH=/usr/i586-mingw32msvc/bin:$PATH
145         CC=/usr/bin/i586-mingw32msvc-gcc
146         export CC
147         CXX=/usr/bin/i586-mingw32msvc-g++
148         export CXX
149      else
150         # variant of debian mingw32 package?
151         PATH=/usr/i386-mingw32msvc/bin:$PATH
152         CC=/usr/bin/i386-mingw32msvc-gcc
153         export CC
154         CXX=/usr/bin/i386-mingw32msvc-g++
155         export CXX
156      fi
157   fi
158   wxc=wxmsw-2.5-config
159   for a in /usr/i586-mingw32msvc/bin/wx-config ; do
160      test -x "$a" && wxc="$a"
161   done
162   LDFLAGS=
163   CPPFLAGS=
164   if test -d /opt/rx-win32 ; then
165      LDFLAGS=-L/opt/rx-win32/lib
166      CPPFLAGS=-I/opt/rx-win32/include
167   fi
168   if ! ./configure --host=mingw32 --build="$build_platform" --with-x=no CAVEROT= WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; then
169      echo mingw configure failed
170      exit 1
171   fi
172   if ! make ; then
173      echo mingw make failed
174      exit 1
175   fi
176   if ! make mingw_iss ; then
177      echo mingw make mingw_iss failed
178      exit 1
179   fi
180   if ! make distclean ; then
181      echo make distclean failed
182      exit 1
183   fi
184   PATH="$SAVE_PATH"
185   CC=
186   CXX=
187fi
Note: See TracBrowser for help on using the repository browser.