source: git/make_release @ 867a48ac

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 867a48ac was ec781e3, checked in by Olly Betts <olly@…>, 20 years ago

No longer need rx lib on win32 - we use wx's built in regexp support.

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

  • Property mode set to 100755
File size: 4.3 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 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   export CFLAGS
63   export CXXFLAGS
64   # tell the preproceesor to be C89 - this makes it reject // comments
65# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
66# FIXME   CXXFLAGS="-Werror"
67   CFLAGS="-Wp,-std=c89"
68   CXXFLAGS=
69   if ! make dist ; then # distcheck fails extend.tst for some reason!
70      echo make distcheck failed
71      exit 1
72   fi
73   CFLAGS=
74   CXXFLAGS=
75else
76   if ! make dist ; then
77      echo make dist failed
78      exit 1
79   fi
80fi
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
91if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
92   if ! make debian ; then
93      echo make debian failed
94      exit 1
95   fi
96fi
97if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
98   if ! make dos_doc_exe ; then
99      echo make dos_doc_exe failed
100      exit 1
101   fi
102fi
103if ! make distclean ; then
104   echo make distclean failed
105   exit 1
106fi
107unset CC
108unset CXX
109if expr "$mk" : '.*\<mingw\>'; then
110   test -n "$build_platform" || build_platform=`sh config.guess`
111   SAVE_PATH="$PATH"
112   if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
113      # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
114      PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
115   else
116      if test -d /usr/i586-mingw32msvc/bin ; then
117         # debian mingw32 package
118         PATH=/usr/i586-mingw32msvc/bin:$PATH
119         CC=/usr/bin/i586-mingw32msvc-gcc
120         export CC
121         CXX=/usr/bin/i586-mingw32msvc-g++
122         export CXX
123      else
124         # variant of debian mingw32 package?
125         PATH=/usr/i386-mingw32msvc/bin:$PATH
126         CC=/usr/bin/i386-mingw32msvc-gcc
127         export CC
128         CXX=/usr/bin/i386-mingw32msvc-g++
129         export CXX
130      fi
131   fi
132   wxc=wxmsw-2.5-config
133   for a in /usr/i586-mingw32msvc/bin/wxmsw-2.5-config ; do
134      test -x "$a" && wxc="$a"
135   done
136   LDFLAGS=
137   CPPFLAGS=
138   if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
139      echo mingw configure failed
140      exit 1
141   fi
142   if ! make ; then
143      echo mingw make failed
144      exit 1
145   fi
146   if ! make mingw_iss ; then
147      echo mingw make mingw_iss failed
148      exit 1
149   fi
150   if ! make distclean ; then
151      echo make distclean failed
152      exit 1
153   fi
154   PATH="$SAVE_PATH"
155   CC=
156   CXX=
157fi
Note: See TracBrowser for help on using the repository browser.