source: git/make_release@ 9d94813

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 9d94813 was c5eded8, checked in by Olly Betts <olly@…>, 20 years ago

The ftp URLs for config.guess and config.sub no longer work, so just copy
them from Debian's /usr/share/misc if they're newer.

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

  • Property mode set to 100755
File size: 4.1 KB
Line 
1#! /bin/sh
2
3# Needed for wine to run on roadkill:
4LD_ASSUME_KERNEL=2.4.1
5export 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 cp -u /usr/share/misc/config.guess .
49 cp -u /usr/share/misc/config.sub .
50fi
51autoreconf --force -i
52export CC
53export CXX
54CC=gcc
55CXX=g++
56if ! ./configure ; then
57 echo configure failed
58 exit 1
59fi
60if test yes = "$rel" ; then
61 export CFLAGS
62 export CXXFLAGS
63 # tell the preproceesor to be C89 - this makes it reject // comments
64# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
65# FIXME CXXFLAGS="-Werror"
66 CFLAGS="-Wp,-std=c89"
67 CXXFLAGS=
68 if ! make dist ; then # distcheck fails extend.tst for some reason!
69 echo make distcheck failed
70 exit 1
71 fi
72 CFLAGS=
73 CXXFLAGS=
74else
75 if ! make dist ; then
76 echo make dist failed
77 exit 1
78 fi
79fi
80if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
81 if rpmbuild --version > /dev/null 2> /dev/null ; then
82 if ! make rpm ; then
83 echo make rpm failed
84 exit 1
85 fi
86 else
87 echo rpmbuild not installed - skipping rpm generation
88 fi
89fi
90if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
91 if ! make debian ; then
92 echo make debian failed
93 exit 1
94 fi
95fi
96if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
97 if ! make dos_doc_exe ; then
98 echo make dos_doc_exe failed
99 exit 1
100 fi
101fi
102if ! make distclean ; then
103 echo make distclean failed
104 exit 1
105fi
106unset CC
107unset CXX
108if expr "$mk" : '.*\<mingw\>'; then
109 test -n "$build_platform" || build_platform=`sh config.guess`
110 SAVE_PATH="$PATH"
111 if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
112 # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
113 PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
114 else
115 if test -d /usr/i586-mingw32msvc/bin ; then
116 # debian mingw32 package
117 PATH=/usr/i586-mingw32msvc/bin:$PATH
118 CC=/usr/bin/i586-mingw32msvc-gcc
119 export CC
120 CXX=/usr/bin/i586-mingw32msvc-g++
121 export CXX
122 else
123 # variant of debian mingw32 package?
124 PATH=/usr/i386-mingw32msvc/bin:$PATH
125 CC=/usr/bin/i386-mingw32msvc-gcc
126 export CC
127 CXX=/usr/bin/i386-mingw32msvc-g++
128 export CXX
129 fi
130 fi
131 wxc=wxmsw-2.5-config
132 for a in /usr/i586-mingw32msvc/bin/wx-config ; do
133 test -x "$a" && wxc="$a"
134 done
135 LDFLAGS=
136 CPPFLAGS=
137#if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
138 if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; 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.