Blame SOURCES/0004-Introduce-enable-disable-server-option.patch

4b13ad
From 3b780ba9feab2557add8cc76022a58a76b89daf1 Mon Sep 17 00:00:00 2001
4b13ad
From: Boris Ranto <branto@redhat.com>
4b13ad
Date: Tue, 30 Sep 2014 11:49:01 +0200
4b13ad
Subject: [PATCH] Introduce enable/disable server option
4b13ad
4b13ad
---
4b13ad
 configure.ac                          | 22 ++++++++++++++---
4b13ad
 man/Makefile.am                       | 46 ++++++++++++++++++++++-------------
4b13ad
 src/Makefile.am                       | 42 ++++++++++++++++++++++----------
4b13ad
 src/cls/Makefile.am                   |  2 ++
4b13ad
 src/erasure-code/jerasure/Makefile.am |  2 ++
4b13ad
 src/key_value_store/Makefile.am       |  4 ++-
4b13ad
 src/mon/Makefile.am                   |  2 ++
4b13ad
 src/os/Makefile.am                    | 16 +++++++-----
4b13ad
 src/osd/Makefile.am                   |  2 ++
4b13ad
 src/test/Makefile.am                  |  2 ++
4b13ad
 src/test/erasure-code/Makefile.am     |  2 ++
4b13ad
 src/tools/Makefile.am                 |  5 +++-
4b13ad
 12 files changed, 105 insertions(+), 42 deletions(-)
4b13ad
4b13ad
diff --git a/configure.ac b/configure.ac
4b13ad
index fb54df1..3b5cc78 100644
4b13ad
--- a/configure.ac
4b13ad
+++ b/configure.ac
4b13ad
@@ -489,10 +489,24 @@ AC_ARG_WITH([ocf],
4b13ad
             [with_ocf=no])
4b13ad
 AM_CONDITIONAL(WITH_OCF, [ test "$with_ocf" = "yes" ])
4b13ad
 
4b13ad
-# check is snappy-devel is installed, needed by leveldb
4b13ad
-AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])
4b13ad
-# use system leveldb
4b13ad
-AC_CHECK_LIB([leveldb], [leveldb_open], [true], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])
4b13ad
+# server?
4b13ad
+AC_ARG_ENABLE([server],
4b13ad
+            [AS_HELP_STRING([--enable-server], [enable server binaries build])],
4b13ad
+            [],
4b13ad
+            [enable_server=yes])
4b13ad
+AM_CONDITIONAL(ENABLE_SERVER, test "$enable_server" = "yes")
4b13ad
+if test "$enable_server" = "yes"; then
4b13ad
+   AC_DEFINE([ENABLE_SERVER], [1], [Define if you want to build server-side binaries])
4b13ad
+fi
4b13ad
+
4b13ad
+# cond-check if snappy-devel is installed, needed by leveldb that is need by server parts of the project
4b13ad
+AS_IF([test "$enable_server" = "yes"],
4b13ad
+            [AC_CHECK_LIB([snappy], [snappy_compress], [true], [AC_MSG_FAILURE([libsnappy not found])])])
4b13ad
+
4b13ad
+# cond-check leveldb, necessary if server enabled
4b13ad
+AS_IF([test "$enable_server" = "yes"],
4b13ad
+            [AC_CHECK_LIB([leveldb], [leveldb_open], [true], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])])
4b13ad
+
4b13ad
 # see if we can use bloom filters with leveldb
4b13ad
 AC_LANG_PUSH([C++])
4b13ad
 AC_CHECK_HEADER([leveldb/filter_policy.h], [AC_DEFINE([HAVE_LEVELDB_FILTER_POLICY], [1], [Defined if LevelDB supports bloom filters ])])
4b13ad
diff --git a/man/Makefile.am b/man/Makefile.am
4b13ad
index be071b1..0b6564f 100644
4b13ad
--- a/man/Makefile.am
4b13ad
+++ b/man/Makefile.am
4b13ad
@@ -1,30 +1,42 @@
4b13ad
 AUTOMAKE_OPTIONS = gnu
4b13ad
 
4b13ad
 dist_man_MANS = \
4b13ad
-	ceph-osd.8 \
4b13ad
-	ceph-mds.8 \
4b13ad
-	ceph-mon.8 \
4b13ad
-	mkcephfs.8 \
4b13ad
-	ceph-fuse.8 \
4b13ad
 	ceph-syn.8 \
4b13ad
-	crushtool.8 \
4b13ad
-	osdmaptool.8 \
4b13ad
-	monmaptool.8 \
4b13ad
 	ceph-conf.8 \
4b13ad
-	ceph-run.8 \
4b13ad
 	ceph.8 \
4b13ad
-	mount.ceph.8 \
4b13ad
-	radosgw.8 \
4b13ad
-	radosgw-admin.8 \
4b13ad
 	ceph-authtool.8 \
4b13ad
 	rados.8 \
4b13ad
-	librados-config.8 \
4b13ad
 	rbd.8 \
4b13ad
-	ceph-clsinfo.8 \
4b13ad
-	ceph-debugpack.8 \
4b13ad
-	cephfs.8 \
4b13ad
 	ceph-dencoder.8 \
4b13ad
+	ceph-post-file.8
4b13ad
+
4b13ad
+if ENABLE_SERVER
4b13ad
+dist_man_MANS += \
4b13ad
+	ceph-mds.8 \
4b13ad
+	ceph-mon.8 \
4b13ad
+	ceph-osd.8 \
4b13ad
+	mkcephfs.8 \
4b13ad
+	ceph-run.8 \
4b13ad
 	ceph-rest-api.8 \
4b13ad
+	crushtool.8 \
4b13ad
+	osdmaptool.8 \
4b13ad
+	monmaptool.8 \
4b13ad
+	cephfs.8 \
4b13ad
+	mount.ceph.8 \
4b13ad
 	ceph-rbdnamer.8 \
4b13ad
-	ceph-post-file.8 \
4b13ad
+	ceph-debugpack.8 \
4b13ad
+	ceph-clsinfo.8 \
4b13ad
+	librados-config.8
4b13ad
+endif
4b13ad
+
4b13ad
+if WITH_RADOSGW
4b13ad
+dist_man_MANS += \
4b13ad
+	radosgw.8 \
4b13ad
+	radosgw-admin.8
4b13ad
+endif
4b13ad
+
4b13ad
+if WITH_FUSE
4b13ad
+dist_man_MANS += \
4b13ad
+	ceph-fuse.8 \
4b13ad
 	rbd-fuse.8
4b13ad
+endif
4b13ad
diff --git a/src/Makefile.am b/src/Makefile.am
4b13ad
index edec05e..a9299d5 100644
4b13ad
--- a/src/Makefile.am
4b13ad
+++ b/src/Makefile.am
4b13ad
@@ -36,6 +36,7 @@ include tools/Makefile.am
4b13ad
 
4b13ad
 # core daemons
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 ceph_mon_SOURCES = ceph_mon.cc
4b13ad
 ceph_mon_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON)
4b13ad
 bin_PROGRAMS += ceph-mon
4b13ad
@@ -47,13 +48,14 @@ bin_PROGRAMS += ceph-osd
4b13ad
 ceph_mds_SOURCES = ceph_mds.cc
4b13ad
 ceph_mds_LDADD = $(LIBMDS) $(LIBOSDC) $(CEPH_GLOBAL) $(LIBCOMMON)
4b13ad
 bin_PROGRAMS += ceph-mds
4b13ad
-
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 # admin tools
4b13ad
 
4b13ad
 
4b13ad
 # user tools
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 mount_ceph_SOURCES = mount/mount.ceph.c common/secret.c
4b13ad
 mount_ceph_LDADD = $(LIBCOMMON) $(KEYUTILS_LIB)
4b13ad
 if LINUX
4b13ad
@@ -68,6 +70,7 @@ bin_PROGRAMS += cephfs
4b13ad
 librados_config_SOURCES = librados-config.cc
4b13ad
 librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
4b13ad
 bin_PROGRAMS += librados-config
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 ceph_syn_SOURCES = ceph_syn.cc
4b13ad
 ceph_syn_SOURCES += client/SyntheticClient.cc # uses g_conf.. needs cleanup
4b13ad
@@ -127,7 +130,7 @@ editpaths = sed \
4b13ad
 	-e 's|@datadir[@]|$(pkgdatadir)|g' \
4b13ad
 	-e 's|@prefix[@]|$(prefix)|g' \
4b13ad
 	-e 's|@@GCOV_PREFIX_STRIP[@][@]|$(GCOV_PREFIX_STRIP)|g'
4b13ad
-shell_scripts = ceph-debugpack ceph-post-file ceph-crush-location
4b13ad
+shell_scripts = ceph-post-file ceph-crush-location
4b13ad
 $(shell_scripts): Makefile
4b13ad
 $(shell_scripts): %: %.in
4b13ad
 	rm -f $@ $@.tmp
4b13ad
@@ -206,6 +209,7 @@ EXTRA_DIST += \
4b13ad
 	libs3/test \
4b13ad
 	unittest_bufferlist.sh
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 # work around old versions of automake that don't define $docdir
4b13ad
 # NOTE: this won't work on suse, where docdir is /usr/share/doc/packages/$package.
4b13ad
 docdir ?= ${datadir}/doc/ceph
4b13ad
@@ -216,34 +220,43 @@ doc_DATA = $(srcdir)/sample.ceph.conf sample.fetch_config
4b13ad
 
4b13ad
 shell_commondir = $(libdir)/ceph
4b13ad
 shell_common_SCRIPTS = ceph_common.sh
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 bash_completiondir = $(sysconfdir)/bash_completion.d
4b13ad
 bash_completion_DATA = $(srcdir)/bash_completion/ceph \
4b13ad
                $(srcdir)/bash_completion/rados \
4b13ad
-               $(srcdir)/bash_completion/rbd \
4b13ad
-               $(srcdir)/bash_completion/radosgw-admin
4b13ad
+               $(srcdir)/bash_completion/rbd
4b13ad
+if WITH_RADOSGW
4b13ad
+bash_completion_DATA += $(srcdir)/bash_completion/radosgw-admin
4b13ad
+endif
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 ceph_sbin_SCRIPTS = \
4b13ad
 	ceph-disk \
4b13ad
 	ceph-disk-prepare \
4b13ad
 	ceph-disk-activate \
4b13ad
 	ceph-disk-udev \
4b13ad
 	ceph-create-keys
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 bin_SCRIPTS += \
4b13ad
 	ceph \
4b13ad
+	ceph-post-file \
4b13ad
+	ceph-crush-location
4b13ad
+
4b13ad
+if ENABLE_SERVER
4b13ad
+bin_SCRIPTS += \
4b13ad
 	ceph-run \
4b13ad
 	ceph-rest-api \
4b13ad
 	ceph-clsinfo \
4b13ad
 	ceph-debugpack \
4b13ad
 	ceph-rbdnamer \
4b13ad
-	ceph-post-file \
4b13ad
-	ceph-crush-location
4b13ad
-
4b13ad
-BUILT_SOURCES += init-ceph
4b13ad
 su_sbin_SCRIPTS += mkcephfs
4b13ad
+BUILT_SOURCES += init-ceph
4b13ad
+shell_scripts += init-ceph mkcephfs ceph-debugpack
4b13ad
+endif # ENABLE_SERVER
4b13ad
+
4b13ad
 
4b13ad
-shell_scripts += init-ceph mkcephfs
4b13ad
 
4b13ad
 
4b13ad
 
4b13ad
@@ -269,6 +282,7 @@ base: core-daemons admin-tools \
4b13ad
 	cephfs ceph-syn ceph-conf \
4b13ad
 	rados librados-config \
4b13ad
 	init-ceph mkcephfs ceph_mon_store_converter ceph-post-file
4b13ad
+client: ceph ceph-authtool ceph-conf ceph-syn ceph-crush-location rados rbd ceph-post-file brag librbd librados pybind libcephfs
4b13ad
 
4b13ad
 
4b13ad
 # version stuff
4b13ad
@@ -331,8 +345,12 @@ clean-local:
4b13ad
 python_PYTHON = pybind/rados.py \
4b13ad
 		pybind/rbd.py \
4b13ad
 		pybind/cephfs.py \
4b13ad
-		pybind/ceph_argparse.py \
4b13ad
+		pybind/ceph_argparse.py
4b13ad
+
4b13ad
+if ENABLE_SERVER
4b13ad
+python_PYTHON += \
4b13ad
 		pybind/ceph_rest_api.py
4b13ad
+endif
4b13ad
 
4b13ad
 
4b13ad
 # everything else we want to include in a 'make dist'
4b13ad
@@ -354,11 +372,9 @@ noinst_HEADERS += \
4b13ad
 
4b13ad
 # coverage
4b13ad
 
4b13ad
+if ENABLE_COVERAGE
4b13ad
 shell_scripts += ceph-coverage
4b13ad
 bin_SCRIPTS += ceph-coverage
4b13ad
-
4b13ad
-
4b13ad
-if ENABLE_COVERAGE
4b13ad
 COV_DIR = $(DESTDIR)$(libdir)/ceph/coverage
4b13ad
 COV_FILES = $(srcdir)/*.gcno
4b13ad
 COV_LIB_FILES = $(srcdir)/.libs/*.gcno
4b13ad
diff --git a/src/cls/Makefile.am b/src/cls/Makefile.am
4b13ad
index ea44fe7..81ebdbc 100644
4b13ad
--- a/src/cls/Makefile.am
4b13ad
+++ b/src/cls/Makefile.am
4b13ad
@@ -1,5 +1,6 @@
4b13ad
 ## Rados object classes
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 libcls_hello_la_SOURCES = cls/hello/cls_hello.cc
4b13ad
 libcls_hello_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
4b13ad
 libcls_hello_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared -export-symbols-regex '.*__cls_.*'
4b13ad
@@ -56,6 +57,7 @@ libcls_rgw_la_SOURCES = \
4b13ad
 libcls_rgw_la_LIBADD = libjson_spirit.la $(PTHREAD_LIBS) $(EXTRALIBS)
4b13ad
 libcls_rgw_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared -export-symbols-regex '.*__cls_.*'
4b13ad
 radoslib_LTLIBRARIES += libcls_rgw.la
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 ## Rados object client classes
4b13ad
 
4b13ad
diff --git a/src/erasure-code/jerasure/Makefile.am b/src/erasure-code/jerasure/Makefile.am
4b13ad
index e16fe07..e70c8f1 100644
4b13ad
--- a/src/erasure-code/jerasure/Makefile.am
4b13ad
+++ b/src/erasure-code/jerasure/Makefile.am
4b13ad
@@ -12,6 +12,7 @@ noinst_HEADERS += \
4b13ad
   erasure-code/jerasure/gf-complete/include/gf_general.h \
4b13ad
   erasure-code/jerasure/ErasureCodeJerasure.h
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 jerasure_sources = \
4b13ad
   erasure-code/jerasure/jerasure/src/cauchy.c \
4b13ad
   erasure-code/jerasure/jerasure/src/galois.c \
4b13ad
@@ -108,3 +109,4 @@ libec_jerasure_la_LDFLAGS += -export-symbols-regex '.*__erasure_code_.*'
4b13ad
 endif
4b13ad
 
4b13ad
 erasure_codelib_LTLIBRARIES += libec_jerasure.la
4b13ad
+endif # ENABLE_SERVER
4b13ad
diff --git a/src/key_value_store/Makefile.am b/src/key_value_store/Makefile.am
4b13ad
index c4b854f..e69af82 100644
4b13ad
--- a/src/key_value_store/Makefile.am
4b13ad
+++ b/src/key_value_store/Makefile.am
4b13ad
@@ -1,9 +1,11 @@
4b13ad
+if ENABLE_SERVER
4b13ad
 if LINUX
4b13ad
 libcls_kvs_la_SOURCES = key_value_store/cls_kvs.cc
4b13ad
 libcls_kvs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS)
4b13ad
 libcls_kvs_la_LDFLAGS = ${AM_LDFLAGS} -module -avoid-version -shared -export-symbols-regex '.*__cls_.*'
4b13ad
 radoslib_LTLIBRARIES += libcls_kvs.la
4b13ad
-endif
4b13ad
+endif # LINUX
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 noinst_HEADERS += \
4b13ad
 	key_value_store/key_value_structure.h \
4b13ad
diff --git a/src/mon/Makefile.am b/src/mon/Makefile.am
4b13ad
index 6016355..d979eea 100644
4b13ad
--- a/src/mon/Makefile.am
4b13ad
+++ b/src/mon/Makefile.am
4b13ad
@@ -2,6 +2,7 @@ libmon_types_la_SOURCES = \
4b13ad
 	mon/PGMap.cc
4b13ad
 noinst_LTLIBRARIES += libmon_types.la
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 libmon_la_SOURCES = \
4b13ad
 	mon/Monitor.cc \
4b13ad
 	mon/Paxos.cc \
4b13ad
@@ -19,6 +20,7 @@ libmon_la_SOURCES = \
4b13ad
 	mon/ConfigKeyService.cc
4b13ad
 libmon_la_LIBADD = $(LIBAUTH) $(LIBCOMMON) $(LIBOS) $(LIBMON_TYPES)
4b13ad
 noinst_LTLIBRARIES += libmon.la
4b13ad
+endif
4b13ad
 
4b13ad
 noinst_HEADERS += \
4b13ad
 	mon/AuthMonitor.h \
4b13ad
diff --git a/src/os/Makefile.am b/src/os/Makefile.am
4b13ad
index 63a1846..9065aa0 100644
4b13ad
--- a/src/os/Makefile.am
4b13ad
+++ b/src/os/Makefile.am
4b13ad
@@ -3,6 +3,7 @@ libos_types_la_SOURCES = \
4b13ad
 libos_types_la_CXXFLAGS = ${AM_CXXFLAGS}
4b13ad
 noinst_LTLIBRARIES += libos_types.la
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 libos_la_SOURCES = \
4b13ad
 	os/chain_xattr.cc \
4b13ad
 	os/DBObjectMap.cc \
4b13ad
@@ -38,6 +39,15 @@ libos_la_CXXFLAGS = ${AM_CXXFLAGS}
4b13ad
 libos_la_LIBADD = $(LIBOS_TYPES)
4b13ad
 noinst_LTLIBRARIES += libos.la
4b13ad
 
4b13ad
+if WITH_LIBZFS
4b13ad
+libos_zfs_a_SOURCES = os/ZFS.cc
4b13ad
+libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
4b13ad
+noinst_LIBRARIES += libos_zfs.a
4b13ad
+noinst_HEADERS += os/ZFS.h
4b13ad
+endif # WITH_LIBZFS
4b13ad
+
4b13ad
+endif # ENABLE_SERVER
4b13ad
+
4b13ad
 noinst_HEADERS += \
4b13ad
 	os/btrfs_ioctl.h \
4b13ad
 	os/chain_xattr.h \
4b13ad
@@ -66,10 +76,4 @@ noinst_HEADERS += \
4b13ad
 	os/XfsFileStoreBackend.h \
4b13ad
 	os/ZFSFileStoreBackend.h
4b13ad
 
4b13ad
-if WITH_LIBZFS
4b13ad
-libos_zfs_a_SOURCES = os/ZFS.cc
4b13ad
-libos_zfs_a_CXXFLAGS = ${AM_CXXFLAGS} ${LIBZFS_CFLAGS}
4b13ad
-noinst_LIBRARIES += libos_zfs.a
4b13ad
-noinst_HEADERS += os/ZFS.h
4b13ad
-endif
4b13ad
 
4b13ad
diff --git a/src/osd/Makefile.am b/src/osd/Makefile.am
4b13ad
index 75e4877..0b55e84 100644
4b13ad
--- a/src/osd/Makefile.am
4b13ad
+++ b/src/osd/Makefile.am
4b13ad
@@ -5,6 +5,7 @@ libosd_types_la_SOURCES = \
4b13ad
 libosd_types_la_CXXFLAGS = ${AM_CXXFLAGS}
4b13ad
 noinst_LTLIBRARIES += libosd_types.la
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 libosd_la_SOURCES = \
4b13ad
 	osd/PG.cc \
4b13ad
 	osd/ReplicatedPG.cc \
4b13ad
@@ -26,6 +27,7 @@ libosd_la_SOURCES = \
4b13ad
 libosd_la_CXXFLAGS = ${AM_CXXFLAGS}
4b13ad
 libosd_la_LIBADD = $(LIBOSDC) $(LIBOS) $(LIBOSD_TYPES) $(LIBOS_TYPES)
4b13ad
 noinst_LTLIBRARIES += libosd.la
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 noinst_HEADERS += \
4b13ad
 	osd/Ager.h \
4b13ad
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
4b13ad
index 718ab60..67bbf9b 100644
4b13ad
--- a/src/test/Makefile.am
4b13ad
+++ b/src/test/Makefile.am
4b13ad
@@ -71,9 +71,11 @@ endif
4b13ad
 
4b13ad
 bin_PROGRAMS += ceph-dencoder
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 get_command_descriptions_SOURCES = test/common/get_command_descriptions.cc
4b13ad
 get_command_descriptions_LDADD = $(LIBMON) $(LIBCOMMON) $(CEPH_GLOBAL)
4b13ad
 noinst_PROGRAMS += get_command_descriptions
4b13ad
+endif
4b13ad
 
4b13ad
 
4b13ad
 ## Build tests
4b13ad
diff --git a/src/test/erasure-code/Makefile.am b/src/test/erasure-code/Makefile.am
4b13ad
index fdbe003..1732391 100644
4b13ad
--- a/src/test/erasure-code/Makefile.am
4b13ad
+++ b/src/test/erasure-code/Makefile.am
4b13ad
@@ -17,6 +17,7 @@ ceph_erasure_code_LDADD += -ldl
4b13ad
 endif
4b13ad
 bin_DEBUGPROGRAMS += ceph_erasure_code
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 libec_example_la_SOURCES = test/erasure-code/ErasureCodePluginExample.cc
4b13ad
 libec_example_la_CFLAGS = ${AM_CFLAGS}
4b13ad
 libec_example_la_CXXFLAGS= ${AM_CXXFLAGS}
4b13ad
@@ -110,6 +111,7 @@ noinst_HEADERS += test/erasure-code/ErasureCodeExample.h
4b13ad
 unittest_erasure_code_example_CXXFLAGS = $(UNITTEST_CXXFLAGS)
4b13ad
 unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL)
4b13ad
 check_PROGRAMS += unittest_erasure_code_example
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 noinst_HEADERS += \
4b13ad
 	test/erasure-code/ceph_erasure_code_benchmark.h
4b13ad
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
4b13ad
index 6078eb4..efa9ff5 100644
4b13ad
--- a/src/tools/Makefile.am
4b13ad
+++ b/src/tools/Makefile.am
4b13ad
@@ -11,7 +11,7 @@ ceph_kvstore_tool_LDADD = $(LIBOS) $(CEPH_GLOBAL)
4b13ad
 ceph_kvstore_tool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
4b13ad
 bin_DEBUGPROGRAMS += ceph-kvstore-tool
4b13ad
 
4b13ad
-
4b13ad
+if ENABLE_SERVER
4b13ad
 ceph_filestore_tool_SOURCES = tools/ceph_filestore_tool.cc
4b13ad
 ceph_filestore_tool_LDADD = $(LIBOSD) $(LIBOS) $(CEPH_GLOBAL) -lboost_program_options
4b13ad
 if LINUX
4b13ad
@@ -37,6 +37,7 @@ bin_PROGRAMS += crushtool
4b13ad
 osdmaptool_SOURCES = tools/osdmaptool.cc
4b13ad
 osdmaptool_LDADD = $(CEPH_GLOBAL)
4b13ad
 bin_PROGRAMS += osdmaptool
4b13ad
+endif # ENABLE_SERVER
4b13ad
 
4b13ad
 ceph_scratchtool_SOURCES = tools/scratchtool.c
4b13ad
 ceph_scratchtool_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
4b13ad
@@ -94,9 +95,11 @@ ceph_authtool_SOURCES = tools/ceph_authtool.cc
4b13ad
 ceph_authtool_LDADD = $(CEPH_GLOBAL) $(LIBCOMMON)
4b13ad
 bin_PROGRAMS += ceph-authtool
4b13ad
 
4b13ad
+if ENABLE_SERVER
4b13ad
 ceph_mon_store_converter_SOURCES = tools/mon_store_converter.cc
4b13ad
 ceph_mon_store_converter_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL)
4b13ad
 bin_PROGRAMS += ceph_mon_store_converter
4b13ad
+endif
4b13ad
 
4b13ad
 noinst_HEADERS += \
4b13ad
 	tools/rados/rados_sync.h \
4b13ad
-- 
4b13ad
1.9.3
4b13ad