From ad17f52360ddd6f3fa75be5cc7baf72c5dc8e59f Mon Sep 17 00:00:00 2001 From: Jens Thiele Date: Tue, 5 Dec 2006 14:47:22 +0000 Subject: [PATCH 1/1] added test-build-install-use --- test-build-install-use | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) create mode 100755 test-build-install-use diff --git a/test-build-install-use b/test-build-install-use new file mode 100755 index 0000000..15c0ddf --- /dev/null +++ b/test-build-install-use @@ -0,0 +1,47 @@ +#!/bin/bash -x +set -o errexit +set -o nounset + +# todo: safe temp dir creation +INSTDIR="/tmp/jens-delme" +mkdir "$INSTDIR" +INSTPREFIX="/tmp/jens-delme/usr" +MAKE="dmake -d" +./configure --prefix="$INSTPREFIX" +$MAKE dist +$MAKE install + +VERSION="0.1" +TARFILE="libt2n-$VERSION.tar.gz" +cp "$TARFILE" "$INSTDIR" + +# now build example-client using installed libt2n +cd "$INSTDIR" + +function append() { + if [ "x$1" = "x" ]; then + echo "$2" + else + echo "$1:$2" + fi +} + + +# adjust some environment variables +# (this is needed because we installed in non-standard directories) + +# temporarily disable nounset +set +o nounset +export PATH=$(append "$PATH" "$INSTPREFIX/bin") +export LD_LIBRARY_PATH=$(append "$LD_LIBRARY_PATH" "$INSTPREFIX/lib") +export PKG_CONFIG_PATH=$(append "$PKG_CONFIG_PATH" "$INSTPREFIX/lib/pkgconfig") +set -o nounset + +tar xzvf "$TARFILE" +mv "libt2n-$VERSION/example-codegen" . +cd example-codegen +autoreconf -f -i -M "$INSTDIR/usr/share/aclocal" +./configure +# todo: at the moment running make dist on clean source does not work +$MAKE +$MAKE distcheck -- 1.7.1