source: git/make_release @ db095f9

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-datawalls-data-hanging-as-warning
Last change on this file since db095f9 was db095f9, checked in by Olly Betts <olly@…>, 10 years ago

make_release: Turn on optimisation when building aven for Microsoft
Windows.

  • Property mode set to 100755
File size: 2.8 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[098acb1]3set -e
4
[ae1309f]5rel=yes
[e66be9a]6if test x"$1" = x-t ; then
[ae1309f]7   rel=
[f30265a0]8   shift
[d7acd89]9fi
[dd7674d]10
[ae1309f]11if test x"$rel" = xyes ; then
[9d5aa63]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'
[d2980d2]15    echo 'If you just want to test, run with option -t'
16    exit 1
17  fi
[098acb1]18
[d2980d2]19  test ! -f Makefile || make distclean
20  cp -u /usr/share/misc/config.guess .
21  cp -u /usr/share/misc/config.sub .
[f5baa8c]22  mv INSTALL INSTALL.keep
[d2980d2]23  autoreconf --force -i
[f5baa8c]24  mv INSTALL.keep INSTALL
[d2980d2]25  ./configure CC=gcc CXX=g++
[1a2570d]26  make distcheck
[44ef5ec6]27  # FIXME: setting c89 doesn't define unix and suppresses getc_unlocked().
[d2980d2]28  # Tell the preprocessor to be C89 - this makes it reject // comments
29  # FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
30  # FIXME   CXXFLAGS="-Werror"
[f78ad72]31else
[d2980d2]32  make dist
[e719df1]33fi
[098acb1]34
[d2980d2]35# Perform mingw build on a clean unpacked source tree from the release tarball
36# so that (a) we don't need to "make distclean" on the source tree and (b) we
37# ensure that any files required to build the mingw version and installer
38# package are actually shipped in the source tarball.
[a6bb1fa6]39tarball=`ls -1t survex-1*.tar.gz|head -n1`
[d2980d2]40tardir=`basename "$tarball" .tar.gz`
41rm -rf "$tardir"
42tar xf "$tarball"
43cd "$tardir"
[098acb1]44
[0fd6750]45test -n "$build_platform" || build_platform=`sh config.guess`
46SAVE_PATH=$PATH
[d380cd6]47for wxc in \
[a989777]48  /usr/i586-mingw32msvc/lib/wx/config/i586-mingw32msvc-msw-unicode-static-3.0 \
[d380cd6]49  /usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8 \
50  /usr/lib/wx/config/i686-w64-mingw32-msw-unicode-release-static-2.8 \
51  "" ; do
52  if test -z "$wxc" ; then
53    echo "wx-config for mingw not found" >&2
54    exit 1
55  fi
56  if test -x "$wxc" ; then
57    CC=`$wxc --cc`
58    CXX=`$wxc --cxx`
59    break
60  fi
61done
62case $CC in
63  *i586-mingw32msvc-gcc)
64    # debian mingw32 package
65    PATH=/usr/i586-mingw32msvc/bin:$PATH
66    ;;
67  *i386-mingw32msvc-gcc)
68    # debian mingw32 package
69    PATH=/usr/i386-mingw32msvc/bin:$PATH
70    ;;
71esac
72
[d2980d2]73# Passing -Werror to configure causes AC_CHECK_FUNCS to fail, so pass it to
74# make instead.
[db095f9]75./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CXXFLAGS="-g -O2 -fno-strict-aliasing -Werror" WX_CONFIG="$wxc" LDFLAGS='-s -static'
[0fd6750]76make CFLAGS=-Werror
77make mingw_iss
78PATH=$SAVE_PATH
79
[d2980d2]80mv survex-win32-*.exe ..
81cd ..
82
83if test x"$rel" = xyes ; then
84  rm -rf "$tardir"
85fi
[7b12c6d]86
[9c9fd6b]87VERSION=`sed 's/^VERSION *= *//p;d' Makefile`
[8430216]88FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe"
89echo "SHA1 checksums:"
90sha1sum $FILES
91echo
92
[179a57b]93gpg --detach-sign --armour $FILES
94for f in $FILES ; do
95    FILES="$FILES $f.asc"
96done
97
[8430216]98echo "To tag this release and upload it to the webserver, run:"
[9d5aa63]99echo git tag -m"'Tagging $VERSION'" "$VERSION"
[e11c235]100
101HOST=atreus.tartarus.org
102echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION"
[8430216]103echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"
Note: See TracBrowser for help on using the repository browser.