source: git/make_release @ 9edf0e4

v1.0.34
Last change on this file since 9edf0e4 was bc610ce, checked in by Olly Betts <olly@…>, 21 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
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[bbca0fd]3# flags to consider:
4# CFLAGS="-O2 -fomit-frame-pointer"
5# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
[ae1309f]6rel=yes
[e66be9a]7if test x"$1" = x-t ; then
[ae1309f]8   rel=
[f30265a0]9   shift
[d7acd89]10fi
[851c965]11mk=${@-src rpm deb doc alien djgpp mingw}
[ae1309f]12if test x"$rel" = xyes ; then
[f6a3719]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
[e66be9a]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
[bfa0e10]22   CVS2CL=./cvs2cl.pl
23   if ! test -x $CVS2CL ; then
24      CVS2CL=../cvs2cl/cvs2cl.pl
25   fi
[bd25e7c]26   if ! test -x $CVS2CL ; then
27      echo cvs2cl.pl not found
28      exit 1
29   fi
[a20b208]30   TAG="`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`"
[f96f36b]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
[e66be9a]33      echo Failed to update ChangeLog from CVS
34      exit 1
35   fi
[fd51dc3]36fi
37if test -f Makefile ; then
38   if ! make distclean ; then
39      echo make distclean failed
40      exit 1
41   fi
42fi
[1a924269]43if test yes = "$rel" ; then
[38226ad]44   rm -f config.guess.new config.sub.new
[3bd0b64]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' ||\
[70bfbfd]47      wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
[38226ad]48      wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
[9b3648d]49      chmod 755 config.guess.new config.sub.new &&\
[38226ad]50      mv config.guess.new config.guess && mv config.sub.new config.sub
[bd7120b]51fi
[b92fa73]52autoreconf --force -i
[93689ea]53export CC
54export CXX
[0a3b1f7]55CC=gcc
56CXX=g++
[93689ea]57if ! ./configure ; then
[eea518c]58   echo configure failed
59   exit 1
60fi
[1a924269]61if test yes = "$rel" ; then
[72302eb]62   if ! make dist ; then # distcheck fails extend.tst for some reason!
[f78ad72]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
[e719df1]71fi
[851c965]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
[ae1309f]82if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
[9cfb427]83   if ! make debian ; then
[7eb8d4a]84      echo make debian failed
[9cfb427]85      exit 1
86   fi
[f30265a0]87fi
[ae1309f]88if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
[e68fccf]89   if ! make dos_doc_exe ; then
90      echo make dos_doc_exe failed
[e66be9a]91      exit 1
92   fi
[21a0009]93   if ! make riscos_doc_zip ; then
94      echo make riscos_doc_zip failed
95      exit 1
96   fi
[fd51dc3]97fi
[ae1309f]98if expr "$mk" : '.*\<alien\>'; then
[f30265a0]99   if ! make alien_src_zip ; then
100      echo make alien_src_zip failed
101      exit 1
102   fi
[4208811]103fi
[9324b2d]104if ! make distclean ; then
105   echo make distclean failed
106   exit 1
107fi
[93689ea]108unset CC
109unset CXX
[ae1309f]110if expr "$mk" : '.*\<djgpp\>'; then
[6d316f1]111   build_platform=`sh config.guess`
[f30265a0]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
[bc610ce]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
[f30265a0]118      echo djgpp configure failed
119      exit 1
120   fi
121   if ! make ; then
122      echo djgpp make failed
123      exit 1
124   fi
[e68fccf]125   if ! make djgpp_exe ; then
126      echo djgpp make djgpp_exe failed
[e66be9a]127      exit 1
128   fi
[f30265a0]129   if ! make distclean ; then
130      echo make distclean failed
131      exit 1
132   fi
133   PATH="$SAVE_PATH"
[fd51dc3]134fi
[ae1309f]135if expr "$mk" : '.*\<mingw\>'; then
[6d316f1]136   test -n "$build_platform" || build_platform=`sh config.guess`
[f30265a0]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
[b0a751b4]141   else
[f30265a0]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
[5ab82d4]158   wxc=wxmsw-2.5-config
[7d29be9]159   for a in /usr/i586-mingw32msvc/bin/wx-config ; do
[010878c]160      test -x "$a" && wxc="$a"
[e15c435]161   done
162   LDFLAGS=
[010878c]163   CPPFLAGS=
[e15c435]164   if test -d /opt/rx-win32 ; then
[5803cfe]165      LDFLAGS=-L/opt/rx-win32/lib
[e15c435]166      CPPFLAGS=-I/opt/rx-win32/include
167   fi
[bc610ce]168   if ! ./configure --host=mingw32 --build="$build_platform" --with-x=no CAVEROT= WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; then
[f30265a0]169      echo mingw configure failed
170      exit 1
171   fi
172   if ! make ; then
173      echo mingw make failed
174      exit 1
[b0a751b4]175   fi
[8f6f99b]176   if ! make mingw_iss ; then
177      echo mingw make mingw_iss failed
[e66be9a]178      exit 1
179   fi
[f30265a0]180   if ! make distclean ; then
181      echo make distclean failed
182      exit 1
183   fi
184   PATH="$SAVE_PATH"
185   CC=
186   CXX=
[e66be9a]187fi
Note: See TracBrowser for help on using the repository browser.