source: git/make_release @ 39bfb04

RELEASE/1.0RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since 39bfb04 was 7d29be9, checked in by Olly Betts <olly@…>, 21 years ago

Updated path for 2.5.3 msw wx-config

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

  • Property mode set to 100755
File size: 5.4 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
62   export CFLAGS
63   export CXXFLAGS
64   # tell the preproceesor to be C89 - this makes it reject // comments
[22b818fb]65# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
66# FIXME   CXXFLAGS="-Werror"
67   CFLAGS="-Wp,-std=c89"
68   CXXFLAGS=
[72302eb]69   if ! make dist ; then # distcheck fails extend.tst for some reason!
[f78ad72]70      echo make distcheck failed
71      exit 1
72   fi
[1a924269]73   CFLAGS=
74   CXXFLAGS=
[f78ad72]75else
76   if ! make dist ; then
77      echo make dist failed
78      exit 1
79   fi
[e719df1]80fi
[851c965]81if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
82   if rpm --version > /dev/null 2> /dev/null ; then
83      if ! make rpm ; then
84         echo make rpm failed
85         exit 1
86       fi
87   else
88       echo rpm not installed - skipping rpm generation
89   fi
90fi
[ae1309f]91if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
[9cfb427]92   if ! make debian ; then
[7eb8d4a]93      echo make debian failed
[9cfb427]94      exit 1
95   fi
[f30265a0]96fi
[ae1309f]97if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
[e68fccf]98   if ! make dos_doc_exe ; then
99      echo make dos_doc_exe failed
[e66be9a]100      exit 1
101   fi
[21a0009]102   if ! make riscos_doc_zip ; then
103      echo make riscos_doc_zip failed
104      exit 1
105   fi
[fd51dc3]106fi
[ae1309f]107if expr "$mk" : '.*\<alien\>'; then
[f30265a0]108   if ! make alien_src_zip ; then
109      echo make alien_src_zip failed
110      exit 1
111   fi
[4208811]112fi
[9324b2d]113if ! make distclean ; then
114   echo make distclean failed
115   exit 1
116fi
[93689ea]117unset CC
118unset CXX
[ae1309f]119if expr "$mk" : '.*\<djgpp\>'; then
[6d316f1]120   build_platform=`sh config.guess`
[f30265a0]121   SAVE_PATH="$PATH"
122   # for building on mrs30
123   if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
124      PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
125   fi
[a11230b]126   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 CFLAGS=-Werror CXXFLAGS=-Werror ; then
[f30265a0]127      echo djgpp configure failed
128      exit 1
129   fi
130   if ! make ; then
131      echo djgpp make failed
132      exit 1
133   fi
[e68fccf]134   if ! make djgpp_exe ; then
135      echo djgpp make djgpp_exe failed
[e66be9a]136      exit 1
137   fi
[f30265a0]138   if ! make distclean ; then
139      echo make distclean failed
140      exit 1
141   fi
142   PATH="$SAVE_PATH"
[fd51dc3]143fi
[ae1309f]144if expr "$mk" : '.*\<mingw\>'; then
[6d316f1]145   test -n "$build_platform" || build_platform=`sh config.guess`
[f30265a0]146   SAVE_PATH="$PATH"
147   if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
148      # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
149      PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
[b0a751b4]150   else
[f30265a0]151      if test -d /usr/i586-mingw32msvc/bin ; then
152         # debian mingw32 package
153         PATH=/usr/i586-mingw32msvc/bin:$PATH
154         CC=/usr/bin/i586-mingw32msvc-gcc
155         export CC
156         CXX=/usr/bin/i586-mingw32msvc-g++
157         export CXX
158      else
159         # variant of debian mingw32 package?
160         PATH=/usr/i386-mingw32msvc/bin:$PATH
161         CC=/usr/bin/i386-mingw32msvc-gcc
162         export CC
163         CXX=/usr/bin/i386-mingw32msvc-g++
164         export CXX
165      fi
166   fi
[5ab82d4]167   wxc=wxmsw-2.5-config
[7d29be9]168   for a in /usr/i586-mingw32msvc/bin/wx-config ; do
[010878c]169      test -x "$a" && wxc="$a"
[e15c435]170   done
171   LDFLAGS=
[010878c]172   CPPFLAGS=
[e15c435]173   if test -d /opt/rx-win32 ; then
[5803cfe]174      LDFLAGS=-L/opt/rx-win32/lib
[e15c435]175      CPPFLAGS=-I/opt/rx-win32/include
176   fi
[7d87323]177   if ! ./configure --host=mingw32 --build="$build_platform" --with-x=no CAVEROT= WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
[f30265a0]178      echo mingw configure failed
179      exit 1
180   fi
181   if ! make ; then
182      echo mingw make failed
183      exit 1
[b0a751b4]184   fi
[8f6f99b]185   if ! make mingw_iss ; then
186      echo mingw make mingw_iss failed
[e66be9a]187      exit 1
188   fi
[f30265a0]189   if ! make distclean ; then
190      echo make distclean failed
191      exit 1
192   fi
193   PATH="$SAVE_PATH"
194   CC=
195   CXX=
[e66be9a]196fi
Note: See TracBrowser for help on using the repository browser.