source: git/make_release @ dd7674d

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

make_release: Fix defaulting of list of things to do.

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

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