source: git/make_release @ de4b099

RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey v1.2.6
Last change on this file since de4b099 was 4996925, checked in by Olly Betts <olly@…>, 13 years ago

make_release: Update to work with Debian mingw-w64 packages.

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#! /bin/sh
2
3set -e
4
5rel=yes
6if test x"$1" = x-t ; then
7   rel=
8   shift
9fi
10
11if test x"$rel" = xyes ; then
12  # Check there are no uncommitted changes.
13  if git commit -a --dry-run >/dev/null 2>/dev/null ; then
14    echo 'There are uncommitted changes - please rectify'
15    echo 'If you just want to test, run with option -t'
16    exit 1
17  fi
18
19  test ! -f Makefile || make distclean
20  cp -u /usr/share/misc/config.guess .
21  cp -u /usr/share/misc/config.sub .
22  autoreconf --force -i
23  ./configure CC=gcc CXX=g++
24  make distcheck
25  # FIXME: setting c89 doesn't define unix and suppresses getc_unlocked().
26  # Tell the preprocessor to be C89 - this makes it reject // comments
27  # FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
28  # FIXME   CXXFLAGS="-Werror"
29else
30  make dist
31fi
32
33# Perform mingw build on a clean unpacked source tree from the release tarball
34# so that (a) we don't need to "make distclean" on the source tree and (b) we
35# ensure that any files required to build the mingw version and installer
36# package are actually shipped in the source tarball.
37tarball=`ls -1t survex-*.tar.gz`
38tardir=`basename "$tarball" .tar.gz`
39rm -rf "$tardir"
40tar xf "$tarball"
41cd "$tardir"
42
43test -n "$build_platform" || build_platform=`sh config.guess`
44SAVE_PATH=$PATH
45wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8
46if test -x /usr/bin/i686-w64-mingw32-g++ ; then
47  # debian mingw-w64 packages
48  CC=/usr/bin/i686-w64-mingw32-gcc
49  CXX=/usr/bin/i686-w64-mingw32-g++
50  wxc=/usr/lib/wx/config/i686-w64-mingw32-msw-unicode-release-static-2.8
51elif test -d /usr/i586-mingw32msvc/bin ; then
52  # debian mingw32 package
53  PATH=/usr/i586-mingw32msvc/bin:$PATH
54  CC=/usr/bin/i586-mingw32msvc-gcc
55  CXX=/usr/bin/i586-mingw32msvc-g++
56else
57  # variant of debian mingw32 package?
58  PATH=/usr/i386-mingw32msvc/bin:$PATH
59  CC=/usr/bin/i386-mingw32msvc-gcc
60  CXX=/usr/bin/i386-mingw32msvc-g++
61fi
62# Passing -Werror to configure causes AC_CHECK_FUNCS to fail, so pass it to
63# make instead.
64./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CXXFLAGS="-fno-strict-aliasing -Werror" WX_CONFIG="$wxc" LDFLAGS=-s
65make CFLAGS=-Werror
66make mingw_iss
67PATH=$SAVE_PATH
68
69mv survex-win32-*.exe ..
70cd ..
71
72if test x"$rel" = xyes ; then
73  rm -rf "$tardir"
74fi
75
76VERSION=`sed 's/^VERSION *= *//p;d' Makefile`
77FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe"
78echo "SHA1 checksums:"
79sha1sum $FILES
80echo
81
82echo "To tag this release and upload it to the webserver, run:"
83echo git tag -m"'Tagging $VERSION'" "$VERSION"
84
85HOST=atreus.tartarus.org
86echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION"
87echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"
Note: See TracBrowser for help on using the repository browser.