From d93f0bc162d0431a48530e3a6d232c50d87f510f Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Fri, 26 Apr 2013 18:57:17 -0400 Subject: [PATCH] A more friendly approach to make clean in c_src. --- c_src/build_deps.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/c_src/build_deps.sh b/c_src/build_deps.sh index 4efb0e4..86e6354 100755 --- a/c_src/build_deps.sh +++ b/c_src/build_deps.sh @@ -39,7 +39,7 @@ get_wt () git clone ${WT_REPO} && \ (cd $BASEDIR/wiredtiger && git checkout $WT_VSN || exit 1) else - git clone -b ${WT_BRANCH} --single-branch ${WT_REPO} && \ + git clone -b ${WT_BRANCH} ${WT_REPO} && \ (cd $BASEDIR/wiredtiger && git checkout -b $WT_BRANCH origin/$WT_BRANCH || exit 1) fi mv wiredtiger $WT_DIR || exit 1 @@ -51,10 +51,16 @@ get_wt () ./autogen.sh || exit 1 cd ./build_posix || exit 1 [ -e Makefile ] && $MAKE distclean + wt_configure; + ) +} + +wt_configure () +{ + (cd $BASEDIR/$WT_DIR/build_posix ../configure --with-pic \ --enable-snappy \ - --prefix=${BASEDIR}/system || exit 1 - ) + --prefix=${BASEDIR}/system || exit 1) } get_snappy () @@ -89,8 +95,8 @@ update_deps () build_wt () { - (cd $BASEDIR/$WT_DIR/build_posix && \ - $MAKE -j && $MAKE install) + wt_configure; + (cd $BASEDIR/$WT_DIR/build_posix && $MAKE -j && $MAKE install) } build_snappy () @@ -103,9 +109,8 @@ build_snappy () case "$1" in clean) - [ -d $WT_DIR/build_posix ] && \ - rm -rf $WT_DIR/build_posix && mkdir $WT_DIR/build_posix - rm -rf system $WT_DIR $SNAPPY_DIR + [ -d $WT_DIR/build_posix ] && (cd $WT_DIR/build_posix; make distclean) + rm -rf system $SNAPPY_DIR rm -f ${BASEDIR}/../priv/wt rm -f ${BASEDIR}/../priv/libwiredtiger-*.so rm -f ${BASEDIR}/../priv/libwiredtiger_*.so