3 # Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000-2002 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # $Id: altbuild.sh,v 1.19 2008/09/25 04:02:39 tbox Exp $
21 # "Alternative build" test.
23 # Build BIND9 with build options that are seldom tested otherwise.
24 # Specify the CVS tag or the name of a kit .tar.gz file as a
25 # command line argument.
30 2) arg=$1 tmpdir="$2" ;;
32 *) echo "usage: $0 cvs-tag | absolute-path-to-gzipped-tar-file [tmpdir]" >&2; exit 1 ;;
37 test -f util/check-instincludes.sh || {
38 echo "$0: must be run from top of CVS tree";
44 builddir=${tmpdir}/build
45 instdir=${tmpdir}/inst
47 test -d $tmpdir || mkdir $tmpdir
48 test ! -d $kitdir || rm -rf $kitdir
51 test ! -d $srcdir || rm -rf $srcdir
54 test ! -d $builddir || rm -rf $builddir
57 test ! -d $instdir || rm -rf $instdir
66 sh util/kit.sh $tag $kitdir || exit 1
74 cd $builddir || exit 1
76 # Test a libtool / separate object dir / threadless build.
78 CFLAGS="-g -DISC_CHECK_NONE -DISC_MEM_FILL=0 -DISC_LIST_CHECKINIT" \
79 sh $srcdir/bind-*/configure --with-libtool \
80 --disable-threads --with-openssl --prefix=$instdir
85 # Rebuild in the source tree so that the test suite
88 cd $srcdir/bind-* || exit 1
89 CFLAGS="-g -DISC_CHECK_NONE -DISC_MEM_FILL=0 -DISC_LIST_CHECKINIT" \
90 sh configure --with-libtool --disable-threads --prefix=$instdir
94 ( cd bin/tests && make test )
96 # Check the installed header files
99 sh util/check-instincludes.sh $instdir