source: git/make_release@ 7b2830c

RELEASE/1.0 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 7b2830c was 3ac2a39f, checked in by Olly Betts <olly@…>, 25 years ago

Converted to use POSIX regex API; regex search now works on MS Windows.

git-svn-id: file:///home/survex-svn/survex/trunk@1566 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 4.0 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
3rel=yes
[e66be9a]4if test x"$1" = x-t ; then
[ae1309f]5 rel=
[f30265a0]6 shift
[d7acd89]7fi
[ae1309f]8mk=${@-src rpm deb doc alien djgpp mingw}
9if test x"$rel" = xyes ; then
[f6a3719]10 # Update debian changelog entry if necessary
11 # If it does get updated, then the next check will fail...
12 ./update-debcl.pl
13 # Check everything is checked into CVS
[e66be9a]14 if ! cvs diff > /dev/null 2> /dev/null ; then
15 echo There are changes not checked into CVS - please rectify
16 exit 1
17 fi
18 # Update ChangeLog
[bfa0e10]19 CVS2CL=./cvs2cl.pl
20 if ! test -x $CVS2CL ; then
21 CVS2CL=../cvs2cl/cvs2cl.pl
22 fi
23 if ! $CVS2CL 2> /dev/null ; then
[e66be9a]24 echo Failed to update ChangeLog from CVS
25 exit 1
26 fi
[fd51dc3]27fi
28if test -f Makefile ; then
29 if ! make distclean ; then
30 echo make distclean failed
31 exit 1
32 fi
33fi
[ae1309f]34if test x"$rel" = xyes ; then
[38226ad]35 rm -f config.guess.new config.sub.new
[70bfbfd]36 perl -e '-M "config.guess" && -M "config.sub" && exit 1' &&\
37 wget ftp://ftp.gnu.org/gnu/config/config.guess -O config.guess.new &&\
[38226ad]38 wget ftp://ftp.gnu.org/gnu/config/config.sub -O config.sub.new &&\
39 mv config.guess.new config.guess && mv config.sub.new config.sub
[bd7120b]40fi
[dc459c9]41aclocal
42autoheader
43automake -a
44autoconf
[eea518c]45if ! ./configure ; then
46 echo configure failed
47 exit 1
48fi
[87681b8]49if ! make distcheck ; then
50 echo make distcheck failed
[e719df1]51 exit 1
52fi
[ae1309f]53if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
[7eb8d4a]54 if rpm --version > /dev/null 2> /dev/null ; then
55 if ! make rpm ; then
56 echo make rpm failed
57 exit 1
58 fi
59 else
60 echo rpm not installed - skipping rpm generation
[e66be9a]61 fi
[f30265a0]62fi
[ae1309f]63if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
[9cfb427]64 if ! make debian ; then
[7eb8d4a]65 echo make debian failed
[9cfb427]66 exit 1
67 fi
[f30265a0]68fi
[ae1309f]69if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
[e68fccf]70 if ! make dos_doc_exe ; then
71 echo make dos_doc_exe failed
[e66be9a]72 exit 1
73 fi
[21a0009]74 if ! make riscos_doc_zip ; then
75 echo make riscos_doc_zip failed
76 exit 1
77 fi
[fd51dc3]78fi
[ae1309f]79if expr "$mk" : '.*\<alien\>'; then
[f30265a0]80 if ! make alien_src_zip ; then
81 echo make alien_src_zip failed
82 exit 1
83 fi
[4208811]84fi
[9324b2d]85if ! make distclean ; then
86 echo make distclean failed
87 exit 1
88fi
[ae1309f]89if expr "$mk" : '.*\<djgpp\>'; then
[f30265a0]90 SAVE_PATH="$PATH"
91 # for building on mrs30
92 if test -d /opt/crosstools/i386-pc-msdosdjgpp ; then
93 PATH=/opt/crosstools/i386-pc-msdosdjgpp/bin:/opt/crosstools/bin:$PATH
94 fi
95 if ! env LDFLAGS=-s STRIP=echo CAVEROT=caverot.exe \
96 CRLIB=-lalleg CROBJX=dosrot.o ./configure --with-x=no --disable-aven; then
97 echo djgpp configure failed
98 exit 1
99 fi
100 if ! make ; then
101 echo djgpp make failed
102 exit 1
103 fi
[e68fccf]104 if ! make djgpp_exe ; then
105 echo djgpp make djgpp_exe failed
[e66be9a]106 exit 1
107 fi
[f30265a0]108 if ! make distclean ; then
109 echo make distclean failed
110 exit 1
111 fi
112 PATH="$SAVE_PATH"
[fd51dc3]113fi
[ae1309f]114if expr "$mk" : '.*\<mingw\>'; then
[f30265a0]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
[b0a751b4]119 else
[f30265a0]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
[3ac2a39f]136 if ! env LDFLAGS="-s -L/opt/rx-win32/lib" CPPFLAGS=-I/opt/rx-win32/include CAVEROT= ./configure --with-x=no --with-wxconfig=`pwd`/mingw_extras/wxmsw-config ; then
[f30265a0]137 echo mingw configure failed
138 exit 1
139 fi
140 if ! make ; then
141 echo mingw make failed
142 exit 1
[b0a751b4]143 fi
[8f6f99b]144 if ! make mingw_iss ; then
145 echo mingw make mingw_iss failed
[e66be9a]146 exit 1
147 fi
[f30265a0]148 if ! make distclean ; then
149 echo make distclean failed
150 exit 1
151 fi
152 PATH="$SAVE_PATH"
153 CC=
154 CXX=
[e66be9a]155fi
Note: See TracBrowser for help on using the repository browser.