source: git/make_release@ b63cf6cc

RELEASE/1.1 RELEASE/1.2 debug-ci debug-ci-sanitisers faster-cavernlog log-select main stereo stereo-2025 walls-data walls-data-hanging-as-warning warn-only-for-hanging-survey
Last change on this file since b63cf6cc was b462168, checked in by Olly Betts <olly@…>, 23 years ago

Merged from 1.0 branch.

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

  • Property mode set to 100755
File size: 5.1 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 TAG="`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`"
27 if ! cvs log -r$TAG::|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
28 echo Failed to update ChangeLog from CVS
29 exit 1
30 fi
31fi
32if test -f Makefile ; then
33 if ! make distclean ; then
34 echo make distclean failed
35 exit 1
36 fi
37fi
38if test yes = "$rel" ; then
39 rm -f config.guess.new config.sub.new
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' ||\
42 wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
43 wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
44 chmod 755 config.guess.new config.sub.new &&\
45 mv config.guess.new config.guess && mv config.sub.new config.sub
46fi
47aclocal
48autoheader
49automake -a
50autoconf
51export CC
52export CXX
53CC=gcc-3.2
54CXX=g++-3.2
55if ! ./configure ; then
56 echo configure failed
57 exit 1
58fi
59if test yes = "$rel" ; then
60 export CFLAGS
61 export CXXFLAGS
62 # tell the preproceesor to be C89 - this makes it reject // comments
63# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
64# FIXME CXXFLAGS="-Werror"
65 CFLAGS="-Wp,-std=c89"
66 CXXFLAGS=
67 if ! make dist ; then # distcheck fails extend.tst for some reason!
68 echo make distcheck failed
69 exit 1
70 fi
71 CFLAGS=
72 CXXFLAGS=
73else
74 if ! make dist ; then
75 echo make dist failed
76 exit 1
77 fi
78fi
79if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
80 if rpm --version > /dev/null 2> /dev/null ; then
81 if ! make rpm ; then
82 echo make rpm failed
83 exit 1
84 fi
85 else
86 echo rpm not installed - skipping rpm generation
87 fi
88fi
89if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
90 if ! make debian ; then
91 echo make debian failed
92 exit 1
93 fi
94fi
95if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
96 if ! make dos_doc_exe ; then
97 echo make dos_doc_exe failed
98 exit 1
99 fi
100 if ! make riscos_doc_zip ; then
101 echo make riscos_doc_zip failed
102 exit 1
103 fi
104fi
105if expr "$mk" : '.*\<alien\>'; then
106 if ! make alien_src_zip ; then
107 echo make alien_src_zip failed
108 exit 1
109 fi
110fi
111if ! make distclean ; then
112 echo make distclean failed
113 exit 1
114fi
115unset CC
116unset CXX
117if expr "$mk" : '.*\<djgpp\>'; then
118 build_platform=`sh config.guess`
119 SAVE_PATH="$PATH"
120 # for building on mrs30
121 if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
122 PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
123 fi
124 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
125 echo djgpp configure failed
126 exit 1
127 fi
128 if ! make ; then
129 echo djgpp make failed
130 exit 1
131 fi
132 if ! make djgpp_exe ; then
133 echo djgpp make djgpp_exe failed
134 exit 1
135 fi
136 if ! make distclean ; then
137 echo make distclean failed
138 exit 1
139 fi
140 PATH="$SAVE_PATH"
141fi
142if expr "$mk" : '.*\<mingw\>'; then
143 test -n "$build_platform" || build_platform=`sh config.guess`
144 SAVE_PATH="$PATH"
145 if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
146 # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
147 PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
148 else
149 if test -d /usr/i586-mingw32msvc/bin ; then
150 # debian mingw32 package
151 PATH=/usr/i586-mingw32msvc/bin:$PATH
152 CC=/usr/bin/i586-mingw32msvc-gcc
153 export CC
154 CXX=/usr/bin/i586-mingw32msvc-g++
155 export CXX
156 else
157 # variant of debian mingw32 package?
158 PATH=/usr/i386-mingw32msvc/bin:$PATH
159 CC=/usr/bin/i386-mingw32msvc-gcc
160 export CC
161 CXX=/usr/bin/i386-mingw32msvc-g++
162 export CXX
163 fi
164 fi
165 if ! ./configure --host=mingw32 --build="$build_platform" --with-x=no WXCONFIG=/opt/wxmsw-2.4.0/bin/wxmsw-2.4-i686-mingw32-config VLDFLAGS="-s -L/opt/rx-win32/lib" CPPFLAGS=-I/opt/rx-win32/include CAVEROT= CFLAGS=-Werror CXXFLAGS=-Werror ; then
166 echo mingw configure failed
167 exit 1
168 fi
169 if ! make ; then
170 echo mingw make failed
171 exit 1
172 fi
173 if ! make mingw_iss ; then
174 echo mingw make mingw_iss failed
175 exit 1
176 fi
177 if ! make distclean ; then
178 echo make distclean failed
179 exit 1
180 fi
181 PATH="$SAVE_PATH"
182 CC=
183 CXX=
184fi
Note: See TracBrowser for help on using the repository browser.