(no commit message)
[libt2n] / test-build-install-use
index 15c0ddf..66954cc 100755 (executable)
@@ -6,14 +6,21 @@ set -o nounset
 INSTDIR="/tmp/jens-delme"
 mkdir "$INSTDIR"
 INSTPREFIX="/tmp/jens-delme/usr"
-MAKE="dmake -d"
+MAKE="dmake"
 ./configure --prefix="$INSTPREFIX"
-$MAKE dist
+# todo: at the moment running make dist on clean source does not work
+$MAKE
+$MAKE distcheck
+#$MAKE dist
 $MAKE install
 
+echo "OK: library and code generator compiled and installed"
+
 VERSION="0.1"
 TARFILE="libt2n-$VERSION.tar.gz"
 cp "$TARFILE" "$INSTDIR"
+EXAMPLE_LIBUSAGE="example-libusage"
+cp -af "$EXAMPLE_LIBUSAGE" "$INSTDIR"
 
 # now build example-client using installed libt2n
 cd "$INSTDIR"
@@ -41,7 +48,17 @@ tar xzvf "$TARFILE"
 mv "libt2n-$VERSION/example-codegen" .
 cd example-codegen
 autoreconf -f -i -M "$INSTDIR/usr/share/aclocal"
-./configure
+./configure --prefix="$INSTPREFIX"
 # todo: at the moment running make dist on clean source does not work
 $MAKE
 $MAKE distcheck
+$MAKE install
+cd ..
+echo "OK: example using installed libt2n works"
+
+# now compile client using the installed default lib
+cd "$EXAMPLE_LIBUSAGE"
+autoreconf -f -i -M "$INSTDIR/usr/share/aclocal"
+./configure --prefix="$INSTPREFIX"
+$MAKE distcheck
+echo "OK: example using installed example lib works"