source: git/make_release@ c37f076

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 c37f076 was c37f076, checked in by Olly Betts <olly@…>, 21 years ago

CFLAGS=-Werror on mingw causes problems so disable for now

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

  • Property mode set to 100755
File size: 4.5 KB
Line 
1#! /bin/sh
2
3## Needed for wine to run on roadkill:
4#LD_ASSUME_KERNEL=2.4.1
5#export LD_ASSUME_KERNEL
6
7# flags to consider:
8# CFLAGS="-O2 -fomit-frame-pointer"
9# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
10rel=yes
11if test x"$1" = x-t ; then
12 rel=
13 shift
14fi
15mk=${@-src rpm deb doc mingw}
16if test x"$rel" = xyes ; then
17 # Update debian changelog entry if necessary
18 # If it does get updated, then the next check will fail...
19 ./update-debcl.pl
20 # Check everything is checked into CVS
21 if ! cvs diff > /dev/null 2> /dev/null ; then
22 echo There are changes not checked into CVS - please rectify
23 exit 1
24 fi
25 # Update ChangeLog
26 CVS2CL=./cvs2cl.pl
27 if ! test -x $CVS2CL ; then
28 CVS2CL=../cvs2cl/cvs2cl.pl
29 fi
30 if ! test -x $CVS2CL ; then
31 echo cvs2cl.pl not found
32 exit 1
33 fi
34 TAG=`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`
35 # stderr | grep -v '^cvs server: warning: no revision .*/Attic/'
36 if ! cvs log -r$TAG:: 2> /dev/null|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
37 echo Failed to update ChangeLog from CVS
38 exit 1
39 fi
40fi
41if test -f Makefile ; then
42 if ! make distclean ; then
43 echo make distclean failed
44 exit 1
45 fi
46fi
47if test yes = "$rel" ; then
48 rm -f config.guess.new config.sub.new
49 # only check for new versions if the current ones are over a day old
50 perl -e '-M "config.guess" && -M "config.sub" && exit 1' ||\
51 wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
52 wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
53 chmod 755 config.guess.new config.sub.new &&\
54 mv config.guess.new config.guess && mv config.sub.new config.sub
55fi
56autoreconf --force -i
57export CC
58export CXX
59CC=gcc
60CXX=g++
61if ! ./configure ; then
62 echo configure failed
63 exit 1
64fi
65if test yes = "$rel" ; then
66 export CFLAGS
67 export CXXFLAGS
68 # tell the preproceesor to be C89 - this makes it reject // comments
69# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
70# FIXME CXXFLAGS="-Werror"
71 CFLAGS="-Wp,-std=c89"
72 CXXFLAGS=
73 if ! make dist ; then # distcheck fails extend.tst for some reason!
74 echo make distcheck failed
75 exit 1
76 fi
77 CFLAGS=
78 CXXFLAGS=
79else
80 if ! make dist ; then
81 echo make dist failed
82 exit 1
83 fi
84fi
85if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
86 if rpm --version > /dev/null 2> /dev/null ; then
87 if ! make rpm ; then
88 echo make rpm failed
89 exit 1
90 fi
91 else
92 echo rpm not installed - skipping rpm generation
93 fi
94fi
95if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
96 if ! make debian ; then
97 echo make debian failed
98 exit 1
99 fi
100fi
101if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
102 if ! make dos_doc_exe ; then
103 echo make dos_doc_exe failed
104 exit 1
105 fi
106fi
107if ! make distclean ; then
108 echo make distclean failed
109 exit 1
110fi
111unset CC
112unset CXX
113if expr "$mk" : '.*\<mingw\>'; then
114 test -n "$build_platform" || build_platform=`sh config.guess`
115 SAVE_PATH="$PATH"
116 if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
117 # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
118 PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
119 else
120 if test -d /usr/i586-mingw32msvc/bin ; then
121 # debian mingw32 package
122 PATH=/usr/i586-mingw32msvc/bin:$PATH
123 CC=/usr/bin/i586-mingw32msvc-gcc
124 export CC
125 CXX=/usr/bin/i586-mingw32msvc-g++
126 export CXX
127 else
128 # variant of debian mingw32 package?
129 PATH=/usr/i386-mingw32msvc/bin:$PATH
130 CC=/usr/bin/i386-mingw32msvc-gcc
131 export CC
132 CXX=/usr/bin/i386-mingw32msvc-g++
133 export CXX
134 fi
135 fi
136 wxc=wxmsw-2.5-config
137 for a in /usr/i586-mingw32msvc/bin/wx-config ; do
138 test -x "$a" && wxc="$a"
139 done
140 LDFLAGS=
141 CPPFLAGS=
142#if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
143 if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CXXFLAGS=-Werror ; then
144 echo mingw configure failed
145 exit 1
146 fi
147 if ! make ; then
148 echo mingw make failed
149 exit 1
150 fi
151 if ! make mingw_iss ; then
152 echo mingw make mingw_iss failed
153 exit 1
154 fi
155 if ! make distclean ; then
156 echo make distclean failed
157 exit 1
158 fi
159 PATH="$SAVE_PATH"
160 CC=
161 CXX=
162fi
Note: See TracBrowser for help on using the repository browser.