2008-01-28 02:12:20 +00:00
|
|
|
AUTOMAKE_OPTIONS = gnu
|
2012-10-08 17:04:25 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
2014-11-25 16:25:26 +00:00
|
|
|
EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh
|
2015-01-26 00:38:46 +00:00
|
|
|
# the "." here makes sure check-local builds gtest and gmock before they are used
|
2015-05-15 13:18:05 +00:00
|
|
|
SUBDIRS = . src man doc systemd selinux
|
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
|
|
|
|
2011-01-13 21:38:40 +00:00
|
|
|
EXTRA_DIST += \
|
|
|
|
src/test/run-cli-tests \
|
2011-09-23 22:15:13 +00:00
|
|
|
src/test/run-cli-tests-maybe-unset-ccache \
|
2011-01-14 18:33:31 +00:00
|
|
|
src/test/cli \
|
2011-03-08 00:03:08 +00:00
|
|
|
src/test/downloads \
|
2015-04-13 15:43:11 +00:00
|
|
|
systemd/ceph.tmpfiles.d \
|
2015-09-04 17:49:09 +00:00
|
|
|
etc/default/ceph \
|
|
|
|
etc/sysconfig/ceph \
|
|
|
|
etc/sysconfig/SuSEfirewall2.d/services/ceph-mon \
|
|
|
|
etc/sysconfig/SuSEfirewall2.d/services/ceph-osd-mds \
|
2013-02-14 01:30:19 +00:00
|
|
|
udev/50-rbd.rules \
|
2016-06-23 07:23:09 +00:00
|
|
|
udev/60-ceph-by-parttypeuuid.rules \
|
2013-04-11 16:42:13 +00:00
|
|
|
udev/95-ceph-osd.rules \
|
2013-08-17 00:59:11 +00:00
|
|
|
share/known_hosts_drop.ceph.com \
|
|
|
|
share/id_dsa_drop.ceph.com \
|
|
|
|
share/id_dsa_drop.ceph.com.pub
|
2011-06-14 19:53:33 +00:00
|
|
|
|
2015-12-09 19:55:38 +00:00
|
|
|
NPROC = nproc
|
|
|
|
if FREEBSD
|
|
|
|
NPROC = sysctl -n hw.ncpu
|
|
|
|
endif
|
|
|
|
|
2013-08-17 00:59:11 +00:00
|
|
|
# why is it so hard to make autotools to this?
|
2015-05-02 14:16:57 +00:00
|
|
|
install-data-local::
|
2013-08-17 00:59:11 +00:00
|
|
|
-mkdir -p $(DESTDIR)$(datadir)/ceph
|
2015-06-01 22:10:14 +00:00
|
|
|
-install -m 600 share/known_hosts_drop.ceph.com $(DESTDIR)$(datadir)/ceph/known_hosts_drop.ceph.com
|
|
|
|
-install -m 600 share/id_dsa_drop.ceph.com $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com
|
|
|
|
-install -m 600 share/id_dsa_drop.ceph.com.pub $(DESTDIR)$(datadir)/ceph/id_dsa_drop.ceph.com.pub
|
2011-08-09 22:21:53 +00:00
|
|
|
|
2015-05-02 14:16:57 +00:00
|
|
|
all-local::
|
2011-08-09 22:21:53 +00:00
|
|
|
if WITH_DEBUG
|
|
|
|
# We need gtest to build the rados-api tests. We only build those in
|
|
|
|
# a debug build, though.
|
2015-01-26 00:38:46 +00:00
|
|
|
@cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
|
|
|
|
@cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
|
2011-08-09 22:21:53 +00:00
|
|
|
endif
|
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
|
|
|
|
2015-05-07 21:12:33 +00:00
|
|
|
CHECK_ULIMIT := true
|
|
|
|
|
2015-05-02 14:16:57 +00:00
|
|
|
check-local:: all
|
2011-08-09 22:21:53 +00:00
|
|
|
# We build gtest this way, instead of using SUBDIRS, because with that,
|
|
|
|
# gtest's own tests would be run and that would slow us down.
|
2015-01-26 00:38:46 +00:00
|
|
|
@cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
|
|
|
|
@cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
|
2011-01-12 00:43:46 +00:00
|
|
|
# exercise cli tools
|
2015-05-07 21:12:33 +00:00
|
|
|
u=`ulimit -u` ; \
|
2015-12-09 19:55:38 +00:00
|
|
|
p=`expr $(shell ${NPROC}) / 2` ; \
|
2015-05-07 23:14:47 +00:00
|
|
|
n=`expr $$p \* 1024` ; \
|
2015-05-07 21:12:33 +00:00
|
|
|
if ${CHECK_ULIMIT} && echo ${MAKEFLAGS} | grep --quiet -e -j && test $$u -lt $$n ; then \
|
|
|
|
echo "ulimit -u is $$u which is lower than $$n = $$p / 2 * 1024" ; \
|
|
|
|
echo "If running make -j$$p check you will likely exceed this limit" ; \
|
|
|
|
echo "and the tests will fail in mysterious ways." ; \
|
|
|
|
echo "Update /etc/security/limits.conf to increase the limit" ; \
|
|
|
|
echo "or run make CHECK_ULIMIT=false -j4 check to override this safeguard." ; \
|
|
|
|
exit 1 ; \
|
|
|
|
fi
|
2015-05-16 08:57:43 +00:00
|
|
|
|
2015-11-13 15:23:27 +00:00
|
|
|
# display the output of failed check_SCRIPTS after a failed make check
|
|
|
|
export VERBOSE = true
|
|
|
|
|
|
|
|
TESTS = $(check_SCRIPTS)
|
|
|
|
|
2015-05-16 08:57:43 +00:00
|
|
|
check_SCRIPTS = \
|
|
|
|
src/test/run-cli-tests
|
2011-01-12 00:43:46 +00:00
|
|
|
|
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
|
|
|
# "make distclean" both runs this and recurses into src/gtest, if
|
|
|
|
# gtest is in DIST_SUBDIRS. Take extra care to not fail when
|
|
|
|
# effectively cleaned twice.
|
2016-05-02 11:40:05 +00:00
|
|
|
clean-local::
|
2015-01-26 00:38:46 +00:00
|
|
|
@if test -e src/gmock/Makefile; then \
|
|
|
|
echo "Making clean in src/gmock"; \
|
|
|
|
cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
|
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
|
|
|
fi
|
2011-01-14 18:35:20 +00:00
|
|
|
|
|
|
|
@rm -rf src/test/virtualenv
|
2015-05-08 18:53:54 +00:00
|
|
|
@rm -rf install-deps-*
|
2014-05-21 16:50:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
# NOTE: This only works when enough dependencies are installed for
|
|
|
|
# autoconf to be happy. These commands should be run manually to
|
|
|
|
# bootstrap.
|
|
|
|
install-deps:
|
2014-11-25 16:25:26 +00:00
|
|
|
./install-deps.sh
|
2014-06-05 15:31:08 +00:00
|
|
|
|
|
|
|
dist-hook:
|
|
|
|
# Generates the full list of contributors
|
|
|
|
if test -d $(srcdir)/.git; then \
|
|
|
|
cd $(srcdir); \
|
|
|
|
git log --format='%aN <%aE>' | sort -u >$(distdir)/AUTHORS; \
|
|
|
|
fi
|
2014-06-05 15:32:10 +00:00
|
|
|
# Generates ChangeLog from git
|
|
|
|
if test -d $(srcdir)/.git; then \
|
|
|
|
cd $(srcdir); \
|
|
|
|
git log --oneline --decorate --no-merges > $(distdir)/ChangeLog; \
|
|
|
|
fi
|