source: git/make_release @ 098acb1

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

make_release: Use "set -e" rather than checking the exit codes of
commands. -t no longer disables targets - set mk to do that.

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

  • Property mode set to 100755
File size: 2.2 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[098acb1]3set -e
4
[27b8b59]5# flags to consider:
6# CFLAGS="-O2 -fomit-frame-pointer"
7# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
[ae1309f]8rel=yes
[e66be9a]9if test x"$1" = x-t ; then
[ae1309f]10   rel=
[f30265a0]11   shift
[d7acd89]12fi
[dd7674d]13mk=${*:-"src rpm doc mingw"}
14
[ae1309f]15if test x"$rel" = xyes ; then
[f542bda]16   # Check everything is checked into SVN.
17   if svn st | grep -v '^?' | grep . > /dev/null 2> /dev/null ; then
18      echo There are changes not checked into SVN - please rectify
[e66be9a]19      exit 1
20   fi
[fd51dc3]21fi
22if test -f Makefile ; then
23   if ! make distclean ; then
24      echo make distclean failed
25      exit 1
26   fi
27fi
[098acb1]28
[27b8b59]29if test yes = "$rel" ; then
[c5eded8]30   cp -u /usr/share/misc/config.guess .
31   cp -u /usr/share/misc/config.sub .
[bd7120b]32fi
[098acb1]33
[74dc997]34autoreconf --force -i
[098acb1]35./configure CC=gcc CXX=g++
[27b8b59]36if test yes = "$rel" ; then
37   export CFLAGS
38   export CXXFLAGS
39   # tell the preproceesor to be C89 - this makes it reject // comments
40# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
41# FIXME   CXXFLAGS="-Werror"
42   CFLAGS="-Wp,-std=c89"
43   CXXFLAGS=
[098acb1]44   make distcheck
[27b8b59]45   CFLAGS=
46   CXXFLAGS=
[f78ad72]47else
[098acb1]48   make dist
[e719df1]49fi
[098acb1]50
51case $mk in
[5a0eabd]52  *rpm*)
53    if rpmbuild --version > /dev/null 2> /dev/null ; then
[098acb1]54      make rpm
[5a0eabd]55    else
56      echo rpmbuild not installed - skipping rpm generation
57    fi
58    ;;
[098acb1]59esac
60
61case $mk in
[5a0eabd]62  *doc*)
[098acb1]63    make dos_doc_exe ;;
64esac
65
66make distclean
67
[5a0eabd]68case $mk in
69  *mingw*)
70    test -n "$build_platform" || build_platform=`sh config.guess`
[098acb1]71    SAVE_PATH=$PATH
[5a0eabd]72    if test -d /usr/i586-mingw32msvc/bin ; then
[9fe15ea]73      # debian mingw32 package
74      PATH=/usr/i586-mingw32msvc/bin:$PATH
75      CC=/usr/bin/i586-mingw32msvc-gcc
76      CXX=/usr/bin/i586-mingw32msvc-g++
[5a0eabd]77    else
[9fe15ea]78      # variant of debian mingw32 package?
79      PATH=/usr/i386-mingw32msvc/bin:$PATH
80      CC=/usr/bin/i386-mingw32msvc-gcc
81      CXX=/usr/bin/i386-mingw32msvc-g++
[5a0eabd]82    fi
83    wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8
84    # -Werror here causes AC_CHECK_FUNCS to fail.
85    CFLAGS=
86    CXXFLAGS='-fno-strict-aliasing -Werror'
[098acb1]87    ./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" WX_CONFIG="$wxc" LDFLAGS=-s
88    make CFLAGS=-Werror
89    make mingw_iss
90    make distclean
91    PATH=$SAVE_PATH
[5a0eabd]92    ;;
93esac
Note: See TracBrowser for help on using the repository browser.