source: git/make_release @ f5baa8c

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

Preserve INSTALL when running autoreconf

  • Property mode set to 100755
File size: 2.7 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  mv INSTALL INSTALL.keep
23  autoreconf --force -i
24  mv INSTALL.keep INSTALL
25  ./configure CC=gcc CXX=g++
26  make distcheck
27  # FIXME: setting c89 doesn't define unix and suppresses getc_unlocked().
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"
31else
32  make dist
33fi
34
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.
39tarball=`ls -1t survex-1*.tar.gz|head -n1`
40tardir=`basename "$tarball" .tar.gz`
41rm -rf "$tardir"
42tar xf "$tarball"
43cd "$tardir"
44
45test -n "$build_platform" || build_platform=`sh config.guess`
46SAVE_PATH=$PATH
47for wxc in \
48  /usr/i586-mingw32msvc/lib/wx/config/i586-mingw32msvc-msw-unicode-static-2.9 \
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
73# Passing -Werror to configure causes AC_CHECK_FUNCS to fail, so pass it to
74# make instead.
75./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CXXFLAGS="-fno-strict-aliasing -Werror" WX_CONFIG="$wxc" LDFLAGS='-s -static'
76make CFLAGS=-Werror
77make mingw_iss
78PATH=$SAVE_PATH
79
80mv survex-win32-*.exe ..
81cd ..
82
83if test x"$rel" = xyes ; then
84  rm -rf "$tardir"
85fi
86
87VERSION=`sed 's/^VERSION *= *//p;d' Makefile`
88FILES="survex-$VERSION.tar.gz survex-win32-$VERSION.exe"
89echo "SHA1 checksums:"
90sha1sum $FILES
91echo
92
93echo "To tag this release and upload it to the webserver, run:"
94echo git tag -m"'Tagging $VERSION'" "$VERSION"
95
96HOST=atreus.tartarus.org
97echo ssh "$HOST" mkdir /srv/www/survex.com/software/"$VERSION"
98echo scp $FILES "$HOST":/srv/www/survex.com/software/"$VERSION"
Note: See TracBrowser for help on using the repository browser.