source: git/make_release @ b7d232e

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

configure.in,make_release,make_release.in: We no longer need VERSION
in make_release, so no need to generate it from configure.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3389 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}
12if test x"$rel" = xyes ; then
13   # Check everything is checked into SVN.
14   if svn st | grep -v '^?' | grep . > /dev/null 2> /dev/null ; then
15      echo There are changes not checked into SVN - please rectify
16      exit 1
17   fi
18fi
19if test -f Makefile ; then
20   if ! make distclean ; then
21      echo make distclean failed
22      exit 1
23   fi
24fi
25if test yes = "$rel" ; then
26   cp -u /usr/share/misc/config.guess .
27   cp -u /usr/share/misc/config.sub .
28fi
29autoreconf --force -i
30if ! ./configure CC=gcc CXX=g++ ; then
31   echo configure failed
32   exit 1
33fi
34if test yes = "$rel" ; then
35   export CFLAGS
36   export CXXFLAGS
37   # tell the preproceesor to be C89 - this makes it reject // comments
38# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
39# FIXME   CXXFLAGS="-Werror"
40   CFLAGS="-Wp,-std=c89"
41   CXXFLAGS=
42   if ! make distcheck ; then
43      echo make distcheck failed
44      exit 1
45   fi
46   CFLAGS=
47   CXXFLAGS=
48else
49   if ! make dist ; then
50      echo make dist failed
51      exit 1
52   fi
53fi
54if test x"$rel" = xyes ; then
55  case $mk in
56  *rpm*)
57    if rpmbuild --version > /dev/null 2> /dev/null ; then
58      if ! make rpm ; then
59        echo make rpm failed
60        exit 1
61      fi
62    else
63      echo rpmbuild not installed - skipping rpm generation
64    fi
65    ;;
66  esac
67  case $mk in
68  *doc*)
69    if ! make dos_doc_exe ; then
70      echo make dos_doc_exe failed
71      exit 1
72    fi
73    ;;
74  esac
75fi
76if ! make distclean ; then
77   echo make distclean failed
78   exit 1
79fi
80case $mk in
81  *mingw*)
82    test -n "$build_platform" || build_platform=`sh config.guess`
83    SAVE_PATH="$PATH"
84    if test -d /usr/i586-mingw32msvc/bin ; then
85      # debian mingw32 package
86      PATH=/usr/i586-mingw32msvc/bin:$PATH
87      CC=/usr/bin/i586-mingw32msvc-gcc
88      CXX=/usr/bin/i586-mingw32msvc-g++
89    else
90      # variant of debian mingw32 package?
91      PATH=/usr/i386-mingw32msvc/bin:$PATH
92      CC=/usr/bin/i386-mingw32msvc-gcc
93      CXX=/usr/bin/i386-mingw32msvc-g++
94    fi
95    wxc=/usr/lib/wx/config/i586-mingw32msvc-msw-unicode-release-static-2.8
96    # -Werror here causes AC_CHECK_FUNCS to fail.
97    CFLAGS=
98    CXXFLAGS='-fno-strict-aliasing -Werror'
99    if ! ./configure --host=mingw32 --build="$build_platform" CC="$CC" CXX="$CXX" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" WX_CONFIG="$wxc" LDFLAGS=-s ; then
100      echo mingw configure failed
101      exit 1
102    fi
103    if ! make CFLAGS=-Werror ; then
104      echo mingw make failed
105      exit 1
106    fi
107    if ! make mingw_iss ; then
108      echo mingw make mingw_iss failed
109      exit 1
110    fi
111    if ! make distclean ; then
112      echo make distclean failed
113      exit 1
114    fi
115    PATH="$SAVE_PATH"
116    ;;
117esac
Note: See TracBrowser for help on using the repository browser.