OS/X uses ".dylib" rather than ".so" for shared libraries (because it's

special) so I've worked around that.  Also tightened up some tests so that
we're not rebuilding the libraries when not necessary.
This commit is contained in:
Gregory Burd 2013-09-06 09:54:55 -04:00
parent c60fa22422
commit 942e51b753

View file

@ -107,6 +107,11 @@ build_snappy ()
) )
} }
install_shared_lib ()
{
cp -p -P $1 ${BASEDIR}/../priv/`basename ${1%.*}.so`
}
case "$1" in case "$1" in
clean) clean)
[ -e $BASEDIR/$WT_DIR/build_posix/Makefile ] && \ [ -e $BASEDIR/$WT_DIR/build_posix/Makefile ] && \
@ -131,21 +136,23 @@ case "$1" in
;; ;;
*) *)
shopt -s extglob
SUFFIXES='@(so|dylib)'
# Build Snappy # Build Snappy
[ -d $SNAPPY_DIR ] || get_snappy; [ -d $SNAPPY_DIR ] || get_snappy;
[ -d $BASEDIR/$SNAPPY_DIR ] || (echo "Missing Snappy source directory" && exit 1) [ -d $BASEDIR/$SNAPPY_DIR ] || (echo "Missing Snappy source directory" && exit 1)
test -f $BASEDIR/system/lib/libsnappy.so.[0-9].[0-9].[0-9] || build_snappy; test -f $BASEDIR/system/lib/libsnappy.so.[0-9].[0-9].[0-9].* || build_snappy;
# Build WiredTiger # Build WiredTiger
[ -d $WT_DIR ] || get_wt; [ -d $WT_DIR ] || get_wt;
[ -d $BASEDIR/$WT_DIR ] || (echo "Missing WiredTiger source directory" && exit 1) [ -d $BASEDIR/$WT_DIR ] || (echo "Missing WiredTiger source directory" && exit 1)
test -f $BASEDIR/system/lib/libwiredtiger-[0-9].[0-9].[0-9].so \ test -f $BASEDIR/system/lib/libwiredtiger-[0-9].[0-9].[0-9].$SUFFIXES -a \
-a -f $BASEDIR/system/lib/libwiredtiger_snappy.so || build_wt; -f $BASEDIR/system/lib/libwiredtiger_snappy.$SUFFIXES || build_wt;
[ -d $BASEDIR/../priv ] || mkdir ${BASEDIR}/../priv [ -d $BASEDIR/../priv ] || mkdir ${BASEDIR}/../priv
cp -p -P $BASEDIR/system/bin/wt ${BASEDIR}/../priv cp -p -P $BASEDIR/system/bin/wt ${BASEDIR}/../priv
cp -p -P $BASEDIR/system/lib/libwiredtiger-[0-9].[0-9].[0-9].so ${BASEDIR}/../priv install_shared_lib ${BASEDIR}/system/lib/libwiredtiger-[0-9].[0-9].[0-9].$SUFFIXES
cp -p -P $BASEDIR/system/lib/libwiredtiger_snappy.so* ${BASEDIR}/../priv install_shared_lib ${BASEDIR}/system/lib/libwiredtiger_snappy.$SUFFIXES*
cp -p -P $BASEDIR/system/lib/libsnappy.so* ${BASEDIR}/../priv install_shared_lib ${BASEDIR}/system/lib/libsnappy.$SUFFIXES*
;; ;;
esac esac