Here is a typical short one, from the R spkg.
#!/bin/bash
if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
exit 1
fi
cd src
make check
if [ $? -ne 0 ]; then
echo "Error while running the R testsuite ... exiting"
exit 1
fi
Less typically, here is the complete one from the GSL package.
#!/usr/bin/env bash
if [ -z "$SAGE_LOCAL" ] ; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi
# Let the user set an environment variable CFLAG64 to
# indicate the C compiler flag for 64-bit builds. By
# default this will be -m64. IBM's compiler on AIX
# and HP's on HP-UX do NOT use -m64.
if [ -z "$CFLAG64" ] ; then
CFLAG64=-m64
fi
# There is no C++ code in GSL, so no need to do likewise
# with CXXFLAG64.
if [ "x$SAGE64" = xyes ]; then
echo "Building a 64-bit version of the GNU Scientific Library
(GSL)"
CFLAGS="$CFLAGS $CFLAG64"
CPPFLAGS="$CPPFLAGS $CFLAG64" ; export CPPFLAGS
LDFLAGS="$LDFLAGS $CFLAG64" ; export LDFLAGS
fi
if [ "x$SAGE_DEBUG" = xyes ] ; then
CFLAGS="$CFLAGS -g -O0" # No optimisation, aids debugging.
else
CFLAGS="$CFLAGS -g -O2" # Normal optimisation.
fi
export CFLAGS
cd src
$MAKE check
if [ $? -ne 0 ]; then
echo "Error: make check for GSL failed"
exit 1
fi
echo "The self-tests of GSL were successfully passed"
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org