source: git/make_release @ dd7674d

RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
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
Line 
1#! /bin/sh
2
3# flags to consider:
4# CFLAGS="-O2 -fomit-frame-pointer"
5# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
6rel=yes
7if test x"$1" = x-t ; then
8   rel=
9   shift
10fi
11mk=${*:-"src rpm doc mingw"}
12
13if test x"$rel" = xyes ; then
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
17      exit 1
18   fi
19fi
20if test -f Makefile ; then
21   if ! make distclean ; then
22      echo make distclean failed
23      exit 1
24   fi
25fi
26if test yes = "$rel" ; then
27   cp -u /usr/share/misc/config.guess .
28   cp -u /usr/share/misc/config.sub .
29fi
30autoreconf --force -i
31if ! ./configure CC=gcc CXX=g++ ; then
32   echo configure failed
33   exit 1
34fi
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=
43   if ! make distcheck ; then
44      echo make distcheck failed
45      exit 1
46   fi
47   CFLAGS=
48   CXXFLAGS=
49else
50   if ! make dist ; then
51      echo make dist failed
52      exit 1
53   fi
54fi
55if test x"$rel" = xyes ; then
56  case $mk in
57  *rpm*)
58    if rpmbuild --version > /dev/null 2> /dev/null ; then
59      if ! make rpm ; then
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
71      echo make dos_doc_exe failed
72      exit 1
73    fi
74    ;;
75  esac
76fi
77if ! make distclean ; then
78   echo make distclean failed
79   exit 1
80fi
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
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++
90    else
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++
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
101      echo mingw configure failed
102      exit 1
103    fi
104    if ! make CFLAGS=-Werror ; then
105      echo mingw make failed
106      exit 1
107    fi
108    if ! make mingw_iss ; then
109      echo mingw make mingw_iss failed
110      exit 1
111    fi
112    if ! make distclean ; then
113      echo make distclean failed
114      exit 1
115    fi
116    PATH="$SAVE_PATH"
117    ;;
118esac
Note: See TracBrowser for help on using the repository browser.