2014-07-30 19:33:47 +00:00
|
|
|
#!/bin/sh -x
|
2010-11-05 18:34:11 +00:00
|
|
|
|
2013-11-05 16:06:05 +00:00
|
|
|
set -e
|
|
|
|
|
2014-05-19 11:55:36 +00:00
|
|
|
test -f src/ceph.in || {
|
|
|
|
echo "You must run this script in the top-level ceph directory"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2010-11-05 18:34:11 +00:00
|
|
|
check_for_pkg_config() {
|
|
|
|
which pkg-config >/dev/null && return
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "Error: could not find pkg-config"
|
|
|
|
echo
|
|
|
|
echo "Please make sure you have pkg-config installed."
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2013-07-21 01:41:38 +00:00
|
|
|
if [ `which libtoolize` ]; then
|
|
|
|
LIBTOOLIZE=libtoolize
|
|
|
|
elif [ `which glibtoolize` ]; then
|
|
|
|
LIBTOOLIZE=glibtoolize
|
|
|
|
else
|
|
|
|
echo "Error: could not find libtoolize"
|
|
|
|
echo " Please install libtoolize or glibtoolize."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-06-02 20:11:24 +00:00
|
|
|
if test -d ".git" ; then
|
2014-11-24 11:35:50 +00:00
|
|
|
if ! git submodule sync || ! git submodule update --init; then
|
2014-06-02 20:11:24 +00:00
|
|
|
echo "Error: could not initialize submodule projects"
|
|
|
|
echo " Network connectivity might be required."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2008-01-28 02:12:20 +00:00
|
|
|
rm -f config.cache
|
2013-01-09 21:35:16 +00:00
|
|
|
aclocal -I m4 --install
|
2010-11-05 18:34:11 +00:00
|
|
|
check_for_pkg_config
|
2013-07-21 01:41:38 +00:00
|
|
|
$LIBTOOLIZE --force --copy
|
2014-01-15 18:43:49 +00:00
|
|
|
aclocal -I m4 --install
|
2008-01-28 02:12:20 +00:00
|
|
|
autoconf
|
|
|
|
autoheader
|
2010-05-18 15:01:03 +00:00
|
|
|
automake -a --add-missing -Wall
|
Use Google Test framework for unit tests.
Use ``make check`` to run the tests.
The src/gtest directory comes from ``svn export
http://googletest.googlecode.com/svn/tags/release-1.5.0 src/gtest``
and running "git add -f src/gtest".
gtest is licensed under the New BSD license, see src/gtest/COPYING.
For more on Google Test, see http://code.google.com/p/googletest/
Changed autogen.sh regenerate gtest automake files too. Make sure to
run ``./autogen.sh && ./configure`` after merging this commit, or
incremental builds may fail. The automake integration is inspired
heavily by the protobuf project, and may still be problematic.
Make git ignore files generated by gtest compilation.
Currently putting in just one new-style unit test, refactoring old
tests to fit will come in separate commits.
Note: if you are starting daemons, listening on TCP ports, using
multiple machines, mounting filesystems, etc, it's not a unit test
and does not belong in this setup. A framework for system/integration
tests will be provided later.
2011-01-07 21:15:40 +00:00
|
|
|
( cd src/gtest && autoreconf -fvi; )
|
2014-05-28 02:11:37 +00:00
|
|
|
( cd src/rocksdb && autoreconf -fvi; )
|
2008-01-28 02:12:20 +00:00
|
|
|
exit
|