source: git/make_release @ cdd85d6

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

Sync with Survex 1.0.26.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@2507 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 4.3 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[27b8b59]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
[6134f54]11mk=${@-src rpm deb doc 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
[a20b208]26   TAG="`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`"
[1cc0fa7]27   if ! cvs log -r$TAG::|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
[e66be9a]28      echo Failed to update ChangeLog from CVS
29      exit 1
30   fi
[fd51dc3]31fi
32if test -f Makefile ; then
33   if ! make distclean ; then
34      echo make distclean failed
35      exit 1
36   fi
37fi
[27b8b59]38if test yes = "$rel" ; then
[38226ad]39   rm -f config.guess.new config.sub.new
[b462168]40   # only check for new versions if the current ones are over a day old
41   perl -e '-M "config.guess" && -M "config.sub" && exit 1' ||\
[70bfbfd]42      wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
[38226ad]43      wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
[9b3648d]44      chmod 755 config.guess.new config.sub.new &&\
[38226ad]45      mv config.guess.new config.guess && mv config.sub.new config.sub
[bd7120b]46fi
[74dc997]47autoreconf --force -i
[b462168]48export CC
49export CXX
50CC=gcc-3.2
51CXX=g++-3.2
[74dc997]52if ! ./configure --enable-opengl ; then
[eea518c]53   echo configure failed
54   exit 1
55fi
[27b8b59]56if test yes = "$rel" ; then
57   export CFLAGS
58   export CXXFLAGS
59   # tell the preproceesor to be C89 - this makes it reject // comments
60# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
61# FIXME   CXXFLAGS="-Werror"
62   CFLAGS="-Wp,-std=c89"
63   CXXFLAGS=
[b462168]64   if ! make dist ; then # distcheck fails extend.tst for some reason!
[f78ad72]65      echo make distcheck failed
66      exit 1
67   fi
[27b8b59]68   CFLAGS=
69   CXXFLAGS=
[f78ad72]70else
71   if ! make dist ; then
72      echo make dist failed
73      exit 1
74   fi
[e719df1]75fi
[ae1309f]76if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
[7eb8d4a]77   if rpm --version > /dev/null 2> /dev/null ; then
78      if ! make rpm ; then
79         echo make rpm failed
80         exit 1
81       fi
82   else
83       echo rpm not installed - skipping rpm generation
[e66be9a]84   fi
[f30265a0]85fi
[ae1309f]86if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
[9cfb427]87   if ! make debian ; then
[7eb8d4a]88      echo make debian failed
[9cfb427]89      exit 1
90   fi
[f30265a0]91fi
[ae1309f]92if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
[e68fccf]93   if ! make dos_doc_exe ; then
94      echo make dos_doc_exe failed
[e66be9a]95      exit 1
96   fi
[4208811]97fi
[9324b2d]98if ! make distclean ; then
99   echo make distclean failed
100   exit 1
101fi
[b462168]102unset CC
103unset CXX
[ae1309f]104if expr "$mk" : '.*\<mingw\>'; then
[6d316f1]105   test -n "$build_platform" || build_platform=`sh config.guess`
[f30265a0]106   SAVE_PATH="$PATH"
107   if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
108      # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
109      PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
[b0a751b4]110   else
[f30265a0]111      if test -d /usr/i586-mingw32msvc/bin ; then
112         # debian mingw32 package
113         PATH=/usr/i586-mingw32msvc/bin:$PATH
114         CC=/usr/bin/i586-mingw32msvc-gcc
115         export CC
116         CXX=/usr/bin/i586-mingw32msvc-g++
117         export CXX
118      else
119         # variant of debian mingw32 package?
120         PATH=/usr/i386-mingw32msvc/bin:$PATH
121         CC=/usr/bin/i386-mingw32msvc-gcc
122         export CC
123         CXX=/usr/bin/i386-mingw32msvc-g++
124         export CXX
125      fi
126   fi
[74dc997]127   wxc=wxmsw-2.4-config
128   for a in /usr/i586-mingw32msvc/bin/wxmsw-2.4-i586-mingw32msvc-config /opt/wxmsw-2.4.0/bin/wxmsw-2.4-i686-mingw32-config ; do
129      test -x "$a" && wxc="$a"
130   done
[1809849]131   LDFLAGS=
132   CPPFLAGS=
133   if test -d /opt/rx-win32 ; then
134      LDFLAGS=-L/opt/rx-win32/lib
135      CPPFLAGS=-I/opt/rx-win32/include
136   fi
137   if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$WXCONFIG" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
[f30265a0]138      echo mingw configure failed
139      exit 1
140   fi
141   if ! make ; then
142      echo mingw make failed
143      exit 1
[b0a751b4]144   fi
[8f6f99b]145   if ! make mingw_iss ; then
146      echo mingw make mingw_iss failed
[e66be9a]147      exit 1
148   fi
[f30265a0]149   if ! make distclean ; then
150      echo make distclean failed
151      exit 1
152   fi
153   PATH="$SAVE_PATH"
154   CC=
155   CXX=
[e66be9a]156fi
Note: See TracBrowser for help on using the repository browser.