# HG changeset patch # User alpar # Date 1138793596 0 # Node ID 7a7a1f95cc24edcc4b6723efc4f182f120b7b283 # Parent 0722ea2b0907ad2fbc80f6d34eb3d67c3c37c554 Some useful scripts: check-compiler: test whether the repo compiles warningless with various compilers. check-integrity: checks whether everything is svn-added, the makefiles are correct etc. release: creates a version numbered release. Is modifies the repository. DO NOT PLAY WITH IT! diff -r 0722ea2b0907 -r 7a7a1f95cc24 scripts/DO-NOT-PLAY-WITH-release --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/DO-NOT-PLAY-WITH-release Wed Feb 01 11:33:16 2006 +0000 @@ -0,0 +1,1 @@ + diff -r 0722ea2b0907 -r 7a7a1f95cc24 scripts/check-compilers --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/check-compilers Wed Feb 01 11:33:16 2006 +0000 @@ -0,0 +1,57 @@ +#!/bin/bash + +set -e + +function make-dir () { + if [ ! -d $1 ]; then + mkdir $1 + fi +} + +make-dir check-compilers-dir +cd check-compilers-dir + +svn co https://hugo.cs.elte.hu/svn/hugo/trunk + +VERSION=r`svn info trunk|grep 'Revision:'|cut -d ' ' -f 2` +NAME=lemon +DISTNAME=${NAME}-$VERSION +TARNAME=${DISTNAME}.tar.gz + +function makecheck () { + if [ `which $CXX` ]; then + make-dir $ODIR + cd $ODIR + time ../trunk/configure $* + time make check + cd .. + else + echo + echo '***************************************************************' + echo " COMPILER $CXX CANNOT BE FOUND" + echo '***************************************************************' + echo + fi +} + +# CREATE TARBALL + +cd trunk +./bootstrap --amver=1.7 +cd .. + +# CHECK COMPILERS + +ODIR=gcc-3.3 CXX=g++-3.3 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark + +ODIR=gcc-3.4 CXX=gcc-3.4 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark + +ODIR=gcc-4.0 CXX=g++-4.0 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark + +ODIR=icc-9.0 CXX=/opt/intel/cc/9.0/bin/icpc CXXFLAGS='-Werror' makecheck --enable-gui --enable-demo --enable-benchmark + +echo +echo '**********************************************************************' +echo ' REPOSITORY SEEMS OK' +echo '**********************************************************************' +echo diff -r 0722ea2b0907 -r 7a7a1f95cc24 scripts/check-tarball-integrity --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/check-tarball-integrity Wed Feb 01 11:33:16 2006 +0000 @@ -0,0 +1,51 @@ +#!/bin/bash + +set -e + +function make-dir () { + if [ ! -d $1 ]; then + mkdir $1 + fi +} + +rm -rf check-tarball-integrity-dir +make-dir check-tarball-integrity-dir +cd check-tarball-integrity-dir + +svn co https://hugo.cs.elte.hu/svn/hugo/trunk + +VERSION=r`svn info trunk|grep 'Revision:'|cut -d ' ' -f 2` +NAME=lemon +DISTNAME=${NAME}-$VERSION +TARNAME=${DISTNAME}.tar.gz + +function makecheck () { +make-dir $ODIR +cd $ODIR +time ../$DISTNAME/configure $* +time make check +cd .. +} + +# CREATE TARBALL + +cd trunk +./bootstrap --amver=1.7 +./configure CXXFLAGS='-W -Wall -Werror' --enable-gui --enable-demo --enable-benchmark +make doc +make +make VERSION=${VERSION} distcheck + +cd .. + +tar xf trunk/$TARNAME + +# CHECK COMPILERS + +ODIR=obj-dir CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark + +echo +echo '**********************************************************************' +echo ' REPOSITORY SEEMS OK' +echo '**********************************************************************' +echo diff -r 0722ea2b0907 -r 7a7a1f95cc24 scripts/make-snapshot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/make-snapshot Wed Feb 01 11:33:16 2006 +0000 @@ -0,0 +1,3 @@ +#!/bin/bash + +make VERSION=r`svn info|grep 'Revision:'|cut -d ' ' -f 2` $* diff -r 0722ea2b0907 -r 7a7a1f95cc24 scripts/release --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/release Wed Feb 01 11:33:16 2006 +0000 @@ -0,0 +1,74 @@ +#!/bin/bash + +# THE FIRST PARAMETER IS THE VERSION STRING + +set -e + +function make-dir () { + if [ ! -d $1 ]; then + mkdir $1 + fi +} + +VERSION=$1 +PKGNAME=lemon +VERSION_STRING=svn-head + +make-dir release-dir +cd release-dir + +echo +echo '**********************************************************************' +echo ' CHECK OUT' +echo '**********************************************************************' +echo + +rm -rf trunk +svn co https://hugo.cs.elte.hu/svn/hugo/trunk +svn lock trunk + +cd trunk + +echo +echo '**********************************************************************' +echo " CHANGE THE VERSION TO ${VERSION}" +echo '**********************************************************************' +echo + +rpl ${VERSION_STRING} $VERSION configure.ac + + +echo +echo '**********************************************************************' +echo ' CREATE TARBALL' +echo '**********************************************************************' +echo + +./bootstrap --amver-1.7 +./configure CXXFLAGS='-W -Wall -Werror' --enable-gui --enable-demo --enable-benchmark +make doc +make distcheck + +cd .. + +echo +echo '**********************************************************************' +echo ' CREATE THE OTHER TAR FILES' +echo '**********************************************************************' +echo + +mv trunk/${PKGNAME}-${VERSION}.tar.gz . +tar xzf ${PKGNAME}-${VERSION}.tar.gz +mv ${PKGNAME}-${VERSION}/doc/html ./${PKGNAME}-doc-${VERSION} +tar czf ${PKGNAME}-doc-${VERSION}.tar.gz ${PKGNAME}-doc-${VERSION} +tar czf ${PKGNAME}-${VERSION}-nodoc.tar.gz ${PKGNAME}-${VERSION} +rm -rf ${PKGNAME}-${VERSION} ${PKGNAME}-doc-${VERSION} + +echo +echo '**********************************************************************' +echo ' CREATE SVN TAG' +echo '**********************************************************************' +echo + +svn cp trunk https://hugo.cs.elte.hu/svn/hugo/tags/${PKGNAME}-${VERSION} -m "Version ${VERSION} released." +svn unlock trunk