source: git/make_release @ c5eded8

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

The ftp URLs for config.guess and config.sub no longer work, so just copy
them from Debian's /usr/share/misc if they're newer.

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

  • Property mode set to 100755
File size: 4.1 KB
RevLine 
[d7acd89]1#! /bin/sh
[ae1309f]2
[3cbb5ff]3# Needed for wine to run on roadkill:
[0e558e5]4LD_ASSUME_KERNEL=2.4.1
5export LD_ASSUME_KERNEL
[9f43f9d]6
[27b8b59]7# flags to consider:
8# CFLAGS="-O2 -fomit-frame-pointer"
9# CXXFLAGS="-O2 -fno-rtti -fomit-frame-pointer"
[ae1309f]10rel=yes
[e66be9a]11if test x"$1" = x-t ; then
[ae1309f]12   rel=
[f30265a0]13   shift
[d7acd89]14fi
[6134f54]15mk=${@-src rpm deb doc mingw}
[ae1309f]16if test x"$rel" = xyes ; then
[f6a3719]17   # Update debian changelog entry if necessary
18   # If it does get updated, then the next check will fail...
19   ./update-debcl.pl
20   # Check everything is checked into CVS
[e66be9a]21   if ! cvs diff > /dev/null 2> /dev/null ; then
22      echo There are changes not checked into CVS - please rectify
23      exit 1
24   fi
25   # Update ChangeLog
[bfa0e10]26   CVS2CL=./cvs2cl.pl
27   if ! test -x $CVS2CL ; then
28      CVS2CL=../cvs2cl/cvs2cl.pl
29   fi
[fc4b814]30   if ! test -x $CVS2CL ; then
31      echo cvs2cl.pl not found
32      exit 1
33   fi
[9f43f9d]34   TAG=`sed 's/^CHANGELOG_FROM_TAG=//p;d' configure.in`
[fc4b814]35   # stderr | grep -v '^cvs server: warning: no revision .*/Attic/'
36   if ! cvs log -r$TAG:: 2> /dev/null|./fixchangelog.pl $TAG|$CVS2CL --stdin 2> /dev/null ; then
[e66be9a]37      echo Failed to update ChangeLog from CVS
38      exit 1
39   fi
[fd51dc3]40fi
41if test -f Makefile ; then
42   if ! make distclean ; then
43      echo make distclean failed
44      exit 1
45   fi
46fi
[27b8b59]47if test yes = "$rel" ; then
[c5eded8]48   cp -u /usr/share/misc/config.guess .
49   cp -u /usr/share/misc/config.sub .
[bd7120b]50fi
[74dc997]51autoreconf --force -i
[b462168]52export CC
53export CXX
[fc4b814]54CC=gcc
55CXX=g++
56if ! ./configure ; then
[eea518c]57   echo configure failed
58   exit 1
59fi
[27b8b59]60if test yes = "$rel" ; then
61   export CFLAGS
62   export CXXFLAGS
63   # tell the preproceesor to be C89 - this makes it reject // comments
64# FIXME -Werror makes configure explode CFLAGS="-Werror -Wp,-std=c89"
65# FIXME   CXXFLAGS="-Werror"
66   CFLAGS="-Wp,-std=c89"
67   CXXFLAGS=
[b462168]68   if ! make dist ; then # distcheck fails extend.tst for some reason!
[f78ad72]69      echo make distcheck failed
70      exit 1
71   fi
[27b8b59]72   CFLAGS=
73   CXXFLAGS=
[f78ad72]74else
75   if ! make dist ; then
76      echo make dist failed
77      exit 1
78   fi
[e719df1]79fi
[ae1309f]80if test x"$rel" = xyes && expr "$mk" : '.*\<rpm\>' || test x"$mk" = xrpm ; then
[1973548]81   if rpmbuild --version > /dev/null 2> /dev/null ; then
[7eb8d4a]82      if ! make rpm ; then
83         echo make rpm failed
84         exit 1
85       fi
86   else
[1973548]87       echo rpmbuild not installed - skipping rpm generation
[e66be9a]88   fi
[f30265a0]89fi
[ae1309f]90if test x"$rel" = xyes && expr "$mk" : '.*\<deb\>' || test x"$mk" = xdeb ; then
[9cfb427]91   if ! make debian ; then
[7eb8d4a]92      echo make debian failed
[9cfb427]93      exit 1
94   fi
[f30265a0]95fi
[ae1309f]96if test x"$rel" = xyes && expr "$mk" : '.*\<doc\>' || test x"$mk" = xdoc ; then
[e68fccf]97   if ! make dos_doc_exe ; then
98      echo make dos_doc_exe failed
[e66be9a]99      exit 1
100   fi
[4208811]101fi
[9324b2d]102if ! make distclean ; then
103   echo make distclean failed
104   exit 1
105fi
[b462168]106unset CC
107unset CXX
[ae1309f]108if expr "$mk" : '.*\<mingw\>'; then
[6d316f1]109   test -n "$build_platform" || build_platform=`sh config.guess`
[f30265a0]110   SAVE_PATH="$PATH"
111   if test -d /usr/local/cross-tools/i386-mingw32msvc/bin ; then
112      # binaries from http://www.devolution.com/~slouken/SDL/Xmingw32/
113      PATH=/usr/local/cross-tools/bin:/usr/local/cross-tools/i386-mingw32msvc/bin:$PATH
[b0a751b4]114   else
[f30265a0]115      if test -d /usr/i586-mingw32msvc/bin ; then
116         # debian mingw32 package
117         PATH=/usr/i586-mingw32msvc/bin:$PATH
118         CC=/usr/bin/i586-mingw32msvc-gcc
119         export CC
120         CXX=/usr/bin/i586-mingw32msvc-g++
121         export CXX
122      else
123         # variant of debian mingw32 package?
124         PATH=/usr/i386-mingw32msvc/bin:$PATH
125         CC=/usr/bin/i386-mingw32msvc-gcc
126         export CC
127         CXX=/usr/bin/i386-mingw32msvc-g++
128         export CXX
129      fi
130   fi
[fc4b814]131   wxc=wxmsw-2.5-config
[9f43f9d]132   for a in /usr/i586-mingw32msvc/bin/wx-config ; do
[74dc997]133      test -x "$a" && wxc="$a"
134   done
[1809849]135   LDFLAGS=
136   CPPFLAGS=
[c37f076]137#if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" CFLAGS=-Werror CXXFLAGS=-Werror ; then
[3346ddd]138   if ! ./configure --host=mingw32 --build="$build_platform" WXCONFIG="$wxc" LDFLAGS="-s $LDFLAGS" CPPFLAGS="$CPPFLAGS" ; then
[f30265a0]139      echo mingw configure failed
140      exit 1
141   fi
142   if ! make ; then
143      echo mingw make failed
144      exit 1
[b0a751b4]145   fi
[8f6f99b]146   if ! make mingw_iss ; then
147      echo mingw make mingw_iss failed
[e66be9a]148      exit 1
149   fi
[f30265a0]150   if ! make distclean ; then
151      echo make distclean failed
152      exit 1
153   fi
154   PATH="$SAVE_PATH"
155   CC=
156   CXX=
[e66be9a]157fi
Note: See TracBrowser for help on using the repository browser.