From 96c685ee8f42a53cbadf37d43fd22f8479e3afbd Mon Sep 17 00:00:00 2001 From: Boris Ranto Date: Fri, 6 Mar 2015 15:19:53 +0100 Subject: [PATCH] Minor changes in other Makefile.am files to make them support the build refinement --- src/brag/Makefile.am | 3 ++- src/client/Makefile.am | 2 ++ src/erasure-code/Makefile.am | 6 ++++++ src/java/Makefile.am | 8 +++++++- src/key_value_store/Makefile.am | 5 +++++ src/librados/Makefile.am | 6 ++++++ src/libradosstriper/Makefile.am | 8 ++++++++ src/librbd/Makefile.am | 8 ++++++++ src/mds/Makefile.am | 6 +++++- src/mon/Makefile.am | 5 +++++ src/os/Makefile.am | 4 ++++ src/osd/Makefile.am | 11 ++++++++--- src/rbd_replay/Makefile.am | 8 ++++++++ src/rgw/Makefile.am | 10 +++++++--- src/test/erasure-code/Makefile.am | 6 ++++++ src/test/messenger/Makefile.am | 4 +++- 16 files changed, 90 insertions(+), 10 deletions(-) diff --git a/src/brag/Makefile.am b/src/brag/Makefile.am index 35c735baf8f..32456b01c75 100644 --- a/src/brag/Makefile.am +++ b/src/brag/Makefile.am @@ -1,3 +1,4 @@ - +if ENABLE_CLIENT bin_SCRIPTS += brag/client/ceph-brag EXTRA_DIST += brag/server brag/README.md brag/client +endif # ENABLE_CLIENT diff --git a/src/client/Makefile.am b/src/client/Makefile.am index 53107eba517..60dd2278fdc 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -1,3 +1,4 @@ +if ENABLE_CLIENT libclient_la_SOURCES = \ client/Client.cc \ client/Inode.cc \ @@ -33,3 +34,4 @@ endif ceph_test_ioctls_SOURCES = client/test_ioctls.c bin_DEBUGPROGRAMS += ceph_test_ioctls +endif # ENABLE_CLIENT diff --git a/src/erasure-code/Makefile.am b/src/erasure-code/Makefile.am index 3390bacfa7f..7b178b087c4 100644 --- a/src/erasure-code/Makefile.am +++ b/src/erasure-code/Makefile.am @@ -1,3 +1,6 @@ +if ENABLE_SERVER +if WITH_OSD + ## erasure code plugins erasure_codelibdir = $(pkglibdir)/erasure-code @@ -24,3 +27,6 @@ noinst_HEADERS += \ erasure-code/ErasureCode.h \ erasure-code/ErasureCodeInterface.h \ erasure-code/ErasureCodePlugin.h + +endif # WITH_OSD -- nothing else needs it +endif # ENABLE_SERVER diff --git a/src/java/Makefile.am b/src/java/Makefile.am index 4b3d1fb751b..5481e64bd4f 100644 --- a/src/java/Makefile.am +++ b/src/java/Makefile.am @@ -22,6 +22,9 @@ JAVA_TEST_SRC = \ EXTRA_DIST = $(JAVA_SRC) $(JAVA_TEST_SRC) +if ENABLE_CLIENT +if WITH_RADOS +if WITH_CEPHFS if ENABLE_CEPHFS_JAVA JAVA_CLASSES = $(JAVA_SRC:java/%.java=%.class) @@ -78,4 +81,7 @@ java_DATA += libcephfs-test.jar CLEANFILES += test/com/ceph/fs/*.class libcephfs-test.jar endif # HAVE_JUNIT4 (includes WITH_DEBUG) -endif #ENABLE_CEPHFS_JAVA +endif # ENABLE_CEPHFS_JAVA +endif # WITH_CEPHFS +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/key_value_store/Makefile.am b/src/key_value_store/Makefile.am index c4b854f2bd4..1ccf50ef701 100644 --- a/src/key_value_store/Makefile.am +++ b/src/key_value_store/Makefile.am @@ -1,3 +1,6 @@ +if ENABLE_SERVER +if WITH_OSD + if LINUX libcls_kvs_la_SOURCES = key_value_store/cls_kvs.cc libcls_kvs_la_LIBADD = $(PTHREAD_LIBS) $(EXTRALIBS) @@ -10,3 +13,5 @@ noinst_HEADERS += \ key_value_store/kv_flat_btree_async.h \ key_value_store/kvs_arg_types.h +endif # WITH_OSD +endif # ENABLE_SERVER diff --git a/src/librados/Makefile.am b/src/librados/Makefile.am index 8e6de3fcd20..103ffd8aad8 100644 --- a/src/librados/Makefile.am +++ b/src/librados/Makefile.am @@ -1,3 +1,6 @@ +if ENABLE_CLIENT +if WITH_RADOS + librados_internal_la_SOURCES = \ librados/RadosClient.cc \ librados/IoCtxImpl.cc \ @@ -40,3 +43,6 @@ noinst_HEADERS += \ librados/RadosClient.h \ librados/RadosXattrIter.h \ librados/ListObjectImpl.h + +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/libradosstriper/Makefile.am b/src/libradosstriper/Makefile.am index ad0ebb56b33..bd4c1d15955 100644 --- a/src/libradosstriper/Makefile.am +++ b/src/libradosstriper/Makefile.am @@ -1,3 +1,7 @@ +if ENABLE_CLIENT +if WITH_RADOS +if WITH_RADOSSTRIPER + libradosstriper_la_SOURCES = \ libradosstriper/libradosstriper.cc \ libradosstriper/RadosStriperImpl.cc \ @@ -17,3 +21,7 @@ lib_LTLIBRARIES += libradosstriper.la noinst_HEADERS += \ libradosstriper/RadosStriperImpl.h \ libradosstriper/MultiAioCompletionImpl.h + +endif # WITH_RADOSSTRIPER +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/librbd/Makefile.am b/src/librbd/Makefile.am index a4b21d97db1..96d0a00ce30 100644 --- a/src/librbd/Makefile.am +++ b/src/librbd/Makefile.am @@ -2,6 +2,10 @@ librbd_types_la_SOURCES = \ librbd/WatchNotifyTypes.cc noinst_LTLIBRARIES += librbd_types.la +if ENABLE_CLIENT +if WITH_RADOS +if WITH_RBD + librbd_internal_la_SOURCES = \ librbd/AioCompletion.cc \ librbd/AioRequest.cc \ @@ -63,3 +67,7 @@ noinst_HEADERS += \ librbd/SnapInfo.h \ librbd/TaskFinisher.h \ librbd/WatchNotifyTypes.h + +endif # WITH_RBD +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/mds/Makefile.am b/src/mds/Makefile.am index f64318e607b..f00b3f19198 100644 --- a/src/mds/Makefile.am +++ b/src/mds/Makefile.am @@ -1,3 +1,6 @@ +if ENABLE_SERVER +if WITH_MDS + libmds_la_SOURCES = \ mds/Capability.cc \ mds/MDS.cc \ @@ -91,4 +94,5 @@ noinst_HEADERS += \ mds/events/ETableServer.h \ mds/events/EUpdate.h - +endif # WITH_MDS +endif # ENABLE_SERVER diff --git a/src/mon/Makefile.am b/src/mon/Makefile.am index 6016355b1cb..8c969448688 100644 --- a/src/mon/Makefile.am +++ b/src/mon/Makefile.am @@ -2,6 +2,9 @@ libmon_types_la_SOURCES = \ mon/PGMap.cc noinst_LTLIBRARIES += libmon_types.la +if ENABLE_SERVER +if WITH_MON + libmon_la_SOURCES = \ mon/Monitor.cc \ mon/Paxos.cc \ @@ -47,3 +50,5 @@ noinst_HEADERS += \ mon/Session.h \ mon/mon_types.h +endif # WITH_MON +endif # ENABLE_SERVER diff --git a/src/os/Makefile.am b/src/os/Makefile.am index d12adbaf06d..2638810eded 100644 --- a/src/os/Makefile.am +++ b/src/os/Makefile.am @@ -3,6 +3,8 @@ libos_types_la_SOURCES = \ libos_types_la_CXXFLAGS = ${AM_CXXFLAGS} noinst_LTLIBRARIES += libos_types.la +if ENABLE_SERVER + libos_la_SOURCES = \ os/chain_xattr.cc \ os/DBObjectMap.cc \ @@ -99,3 +101,5 @@ libos_la_CXXFLAGS += -std=gnu++11 libos_la_LIBADD += -lkinetic_client -lprotobuf -lglog -lgflags libcrypto.a noinst_HEADERS += os/KineticStore.h endif + +endif # ENABLE_SERVER diff --git a/src/osd/Makefile.am b/src/osd/Makefile.am index 2338f18773d..7998d4d4ea3 100644 --- a/src/osd/Makefile.am +++ b/src/osd/Makefile.am @@ -5,6 +5,9 @@ libosd_types_la_SOURCES = \ libosd_types_la_CXXFLAGS = ${AM_CXXFLAGS} noinst_LTLIBRARIES += libosd_types.la +if ENABLE_SERVER +if WITH_OSD + libosd_la_SOURCES = \ osd/PG.cc \ osd/ReplicatedPG.cc \ @@ -25,6 +28,9 @@ libosd_la_SOURCES = \ objclass/class_api.cc libosd_la_CXXFLAGS = ${AM_CXXFLAGS} +if WITH_KINETIC +libosd_la_CXXFLAGS += -std=gnu++11 +endif libosd_la_LIBADD = $(LIBOSDC) $(LIBOS) $(LIBOSD_TYPES) $(LIBOS_TYPES) if WITH_LTTNG libosd_la_LIBADD += $(LIBOSD_TP) @@ -54,6 +60,5 @@ noinst_HEADERS += \ osd/Watch.h \ osd/osd_types.h -if WITH_KINETIC -libosd_la_CXXFLAGS += -std=gnu++11 -endif +endif # WITH_OSD +endif # ENABLE_SERVER diff --git a/src/rbd_replay/Makefile.am b/src/rbd_replay/Makefile.am index f1f406f2435..fa101b7423f 100644 --- a/src/rbd_replay/Makefile.am +++ b/src/rbd_replay/Makefile.am @@ -1,3 +1,7 @@ +if ENABLE_CLIENT +if WITH_RADOS +if WITH_RBD + # librbd_replay_la exists only to help with unit tests librbd_replay_la_SOURCES = rbd_replay/actions.cc \ rbd_replay/Deser.cc \ @@ -51,3 +55,7 @@ rbd_replay_prep_LDADD = $(LIBRBD) \ if WITH_BABELTRACE bin_PROGRAMS += rbd-replay-prep endif + +endif # WITH_RBD +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/rgw/Makefile.am b/src/rgw/Makefile.am index 06e56c69283..3e5c913a5c4 100644 --- a/src/rgw/Makefile.am +++ b/src/rgw/Makefile.am @@ -1,4 +1,7 @@ +if ENABLE_CLIENT +if WITH_RADOS if WITH_RADOSGW + librgw_la_SOURCES = \ rgw/librgw.cc \ rgw/rgw_acl.cc \ @@ -104,9 +107,6 @@ DENCODER_SOURCES += \ rgw/rgw_json_enc.cc -endif # WITH_RADOSGW - - noinst_HEADERS += \ rgw/logrotate.conf \ rgw/rgw_acl.h \ @@ -163,3 +163,7 @@ noinst_HEADERS += \ civetweb/civetweb.h \ civetweb/include/civetweb.h \ civetweb/src/md5.h + +endif # WITH_RADOSGW +endif # WITH_RADOS +endif # ENABLE_CLIENT diff --git a/src/test/erasure-code/Makefile.am b/src/test/erasure-code/Makefile.am index 62e782fbad6..1a25630dc70 100644 --- a/src/test/erasure-code/Makefile.am +++ b/src/test/erasure-code/Makefile.am @@ -1,3 +1,6 @@ +if ENABLE_SERVER +if WITH_OSD + check_SCRIPTS += \ test/erasure-code/test-erasure-code.sh @@ -232,3 +235,6 @@ noinst_HEADERS += test/erasure-code/ErasureCodeExample.h unittest_erasure_code_example_CXXFLAGS = $(UNITTEST_CXXFLAGS) unittest_erasure_code_example_LDADD = $(LIBOSD) $(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL) check_PROGRAMS += unittest_erasure_code_example + +endif # WITH_OSD +endif # ENABLE_SERVER diff --git a/src/test/messenger/Makefile.am b/src/test/messenger/Makefile.am index 1449cbc9f77..9fe2416614a 100644 --- a/src/test/messenger/Makefile.am +++ b/src/test/messenger/Makefile.am @@ -1,3 +1,4 @@ +if ENABLE_SERVER if ENABLE_XIO noinst_HEADERS += \ @@ -71,4 +72,5 @@ noinst_PROGRAMS += \ xio_server \ xio_client -endif +endif # ENABLE_XIO +endif # ENABLE_SERVER