source: git/make_release.in@ 9c3fdb5

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 9c3fdb5 was f542bda, checked in by Olly Betts <olly@…>, 16 years ago

Use dch to update debian/changelog.

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

  • Property mode set to 100755
File size: 3.7 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
7VERSION="@VERSION@"
8
9# flags to consider:
10# CFLAGS="-O2 -fomit-frame-pointer"
11# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
12rel=yes
13if test x"$1" = x-t ; then
14 rel=
15 shift
16fi
17mk=${@-src rpm deb doc mingw}
18if test x"$rel" = xyes ; then
19 # Update debian changelog entry if necessary
20 # If it does get updated, then the next check will fail...
21 dch -v"$VERSION-1" "New upstream release." || true
22 # Check everything is checked into SVN.
23 if svn st | grep -v '^?' | grep . > /dev/null 2> /dev/null ; then
24 echo There are changes not checked into SVN - please rectify
25 exit 1
26 fi
27fi
28if test -f Makefile ; then
29 if ! make distclean ; then
30 echo make distclean failed
31 exit 1
32 fi
33fi
34if test yes = "$rel" ; then
35 cp -u /usr/share/misc/config.guess .
36 cp -u /usr/share/misc/config.sub .
37fi
38autoreconf --force -i
39export CC
40export CXX
41CC=gcc
42CXX=g++
43if ! ./configure ; then
44 echo configure failed
45 exit 1
46fi
47if test yes = "$rel" ; then
48 export CFLAGS
49 export CXXFLAGS
50 # tell the preproceesor to be C89 - this makes it reject // comments
51# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
52# FIXME CXXFLAGS="-Werror"
53 CFLAGS="-Wp,-std=c89"
54 CXXFLAGS=
55 if ! make dist ; then # distcheck fails extend.tst for some reason!
56 echo make distcheck failed
57 exit 1
58 fi
59 CFLAGS=
60 CXXFLAGS=
61else
62 if ! make dist ; then
63 echo make dist failed
64 exit 1
65 fi
66fi
67if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
68 if rpmbuild --version > /dev/null 2> /dev/null ; then
69 if ! make rpm ; then
70 echo make rpm failed
71 exit 1
72 fi
73 else
74 echo rpmbuild not installed - skipping rpm generation
75 fi
76fi
77if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
78 if ! make debian ; then
79 echo make debian failed
80 exit 1
81 fi
82fi
83if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
84 if ! make dos_doc_exe ; then
85 echo make dos_doc_exe failed
86 exit 1
87 fi
88fi
89if ! make distclean ; then
90 echo make distclean failed
91 exit 1
92fi
93unset CC
94unset CXX
95if expr "$mk" : '.*\<mingw\>'; then
96 test -n "$build_platform" || build_platform=`sh config.guess`
97 SAVE_PATH="$PATH"
98 if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
99 # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
100 PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
101 else
102 if test -d /usr/i586-mingw32msvc/bin ; then
103 # debian mingw32 package
104 PATH=/usr/i586-mingw32msvc/bin:$PATH
105 CC=/usr/bin/i586-mingw32msvc-gcc
106 export CC
107 CXX=/usr/bin/i586-mingw32msvc-g++
108 export CXX
109 else
110 # variant of debian mingw32 package?
111 PATH=/usr/i386-mingw32msvc/bin:$PATH
112 CC=/usr/bin/i386-mingw32msvc-gcc
113 export CC
114 CXX=/usr/bin/i386-mingw32msvc-g++
115 export CXX
116 fi
117 fi
118 wxc=wxmsw-2.5-config
119 for a in /usr/i586-mingw32msvc/bin/wx-config ; do
120 test -x "$a" && wxc="$a"
121 done
122 LDFLAGS=
123 CPPFLAGS=
124#if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
125 if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; then
126 echo mingw configure failed
127 exit 1
128 fi
129 if ! make ; then
130 echo mingw make failed
131 exit 1
132 fi
133 if ! make mingw_iss ; then
134 echo mingw make mingw_iss failed
135 exit 1
136 fi
137 if ! make distclean ; then
138 echo make distclean failed
139 exit 1
140 fi
141 PATH="$SAVE_PATH"
142 CC=
143 CXX=
144fi
Note: See TracBrowser for help on using the repository browser.