3 # Copyright (C) 2004,2005,2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 BDIR=Build-$(hostname)
23 confflags="-C --enable-maintainer-mode --prefix=/usr --sysconfdir=/etc --localstatedir=/var $CONFIGURE_FLAGS"
24 configure="`pwd`/configure $confflags"
25 make=eval\ "${CLEAN:+make $J silent.clean;} \
26 echo -e \"== executing 'make all'...\" && \
27 make $J ${SILENT:+-s silent.}all && \
28 echo -e \"\n== executing 'make check'...\" && \
29 make $J ${SILENT:+-s silent.}check"
34 (x86_64) ARCH_CFLAGS=' -m64';;
35 (i?86) ARCH_CFLAGS=' -m32';;
38 CPPFLAGS=-D_FORTIFY_SOURCE=99$ARCH_CFLAGS
40 ## Usage: xtermTitle <title>
44 echo -ne "\e]0;$@\007"
47 ## Usage: operate <dir> <configure-opts>*
53 echo "******************"
54 echo $"** Operating in directory '$d'..."
55 xtermTitle "Operating in directory '$d'... ($@)"
59 test -z "$CLEAN" || rm -f config.cache
60 test -e Makefile -a -z "$CONFIGURE_FLAGS"|| CCACHE_DISABLE=1 $configure "$@"
69 CFLAGS="-O0 -g3$ARCH_CFLAGS" \
70 CXXFLAGS="-O0 -g3$ARCH_CFLAGS" \
71 CPPFLAGS="$CPPFLAGS" \
72 ./configure $confflags
76 debian-woody|debian-sarge|fc-1-90|fc-1|fc-2|fc-3)
77 cat util-vserver-"$2".tar.bz2 | \
78 ssh $1 "cd /tmp && rm -rf /tmp/util-vserver-* && \
79 tar xjf - && cd util-vserver-$2 && \
80 export PATH=/usr/lib/ccache:/usr/lib/ccache/bin:\$PATH && \
82 make ${SILENT:+-s silent.}all && \
84 make ${SILENT:+-s silent.}check"
88 echo $"Unknown option '$1'" >&2
94 d=$(mktemp -t -d build-ensc.XXXXXX)
103 operate $BDIR/diet-noopt CPPFLAGS="$CPPFLAGS" CFLAGS="$noopt_flags" CXXFLAGS="$noopt_flags" LDFLAGS="$ldflags"
104 operate $BDIR/diet-opt --enable-release CPPFLAGS="$CPPFLAGS" CFLAGS="$opt_flags" CXXFLAGS="$opt_flags" LDFLAGS="$ldflags"
105 operate $BDIR/nodiet-noopt --disable-dietlibc CPPFLAGS="$CPPFLAGS" CFLAGS="$noopt_flags" CXXFLAGS="$noopt_flags" LDFLAGS="$ldflags"
106 operate $BDIR/nodiet-opt --enable-release --disable-dietlibc CPPFLAGS="$CPPFLAGS" CFLAGS="$opt_flags" CXXFLAGS="$opt_flags" LDFLAGS="$ldflags"
107 #operate $BDIR/gcc32-opt --enable-release --disable-dietlibc CPPFLAGS="$CPPFLAGS" CC='ccache gcc32' CXX='ccache g++' CFLAGS="$opt_flags" CXXFLAGS="$opt_flags" LDFLAGS="$ldflags"
109 operate $BDIR/diet-opt-api --enable-release --enable-apis=NOLEGACY CPPFLAGS="$CPPFLAGS" CFLAGS="$opt_flags" CXXFLAGS="$opt_flags" LDFLAGS="$ldflags"
110 operate $BDIR/nodiet-opt-api --enable-release --enable-apis=NOLEGACY --disable-dietlibc CPPFLAGS="$CPPFLAGS" CFLAGS="$opt_flags" CXXFLAGS="$opt_flags" LDFLAGS="$ldflags"