diff --git a/src/Makefile-client.am b/src/Makefile-client.am index ac7de4d21a9..2516c87e8e2 100644 --- a/src/Makefile-client.am +++ b/src/Makefile-client.am @@ -1,35 +1,67 @@ -if ENABLE_CLIENT +bash_completiondir = $(sysconfdir)/bash_completion.d +bash_completion_DATA = $(srcdir)/bash_completion/ceph -if WITH_CEPHFS -cephfs_SOURCES = cephfs.cc -cephfs_LDADD = $(LIBCOMMON) -bin_PROGRAMS += cephfs -endif +bin_SCRIPTS += \ + ceph \ + ceph-post-file -if WITH_RADOS -librados_config_SOURCES = librados-config.cc -librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) -bin_PROGRAMS += librados-config -endif +python_PYTHON += pybind/ceph_argparse.py ceph_syn_SOURCES = ceph_syn.cc ceph_syn_SOURCES += client/SyntheticClient.cc # uses g_conf.. needs cleanup ceph_syn_LDADD = $(LIBCLIENT) $(CEPH_GLOBAL) bin_PROGRAMS += ceph-syn +# assemble Python script with global version variables +# NB: depends on format of ceph_ver.h + +ceph: ceph.in ./ceph_ver.h Makefile + rm -f $@ $@.tmp + echo "#!/usr/bin/env python" >$@.tmp + grep "#define CEPH_GIT_NICE_VER" ./ceph_ver.h | \ + sed -e 's/#define \(.*VER\) /\1=/' >>$@.tmp + grep "#define CEPH_GIT_VER" ./ceph_ver.h | \ + sed -e 's/#define \(.*VER\) /\1=/' -e 's/=\(.*\)$$/="\1"/' >>$@.tmp + cat $(srcdir)/$@.in >>$@.tmp + chmod a+x $@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + + +if WITH_RADOS + +bash_completion_DATA += \ + $(srcdir)/bash_completion/rados + $(srcdir)/bash_completion/radosgw-admin + +python_PYTHON += pybind/rados.py + +librados_config_SOURCES = librados-config.cc +librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) +bin_PROGRAMS += librados-config if WITH_RBD + +bash_completion_DATA += \ + $(srcdir)/bash_completion/rbd \ + +bin_SCRIPTS += \ + ceph-rbdnamer \ + rbd-replay-many + +python_PYTHON += pybind/rbd.py + libkrbd_la_SOURCES = krbd.cc libkrbd_la_LIBADD = $(LIBSECRET) $(LIBCOMMON) -lblkid -ludev if LINUX noinst_LTLIBRARIES += libkrbd.la -endif LINUX +endif # LINUX rbd_SOURCES = rbd.cc rbd_LDADD = $(LIBKRBD) $(LIBRBD) $(LIBRADOS) $(CEPH_GLOBAL) if LINUX bin_PROGRAMS += rbd -endif #LINUX +endif # LINUX endif # WITH_RBD @@ -46,9 +78,15 @@ bin_PROGRAMS += rbd-fuse endif # WITH_FUSE +if WITH_CEPHFS +cephfs_SOURCES = cephfs.cc +cephfs_LDADD = $(LIBCOMMON) +bin_PROGRAMS += cephfs + +python_PYTHON += pybind/cephfs.py + # libcephfs (this should go somewhere else in the future) -if WITH_CEPHFS libcephfs_la_SOURCES = libcephfs.cc libcephfs_la_LIBADD = $(LIBCLIENT) $(LIBCOMMON) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) libcephfs_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 -export-symbols-regex '^ceph_.*' @@ -66,61 +104,8 @@ libcephfs_jni_la_LIBADD = $(LIBCEPHFS) $(EXTRALIBS) libcephfs_jni_la_CPPFLAGS = $(JDK_CPPFLAGS) $(AM_CPPFLAGS) libcephfs_jni_la_LDFLAGS = ${AM_LDFLAGS} -version-info 1:0:0 lib_LTLIBRARIES += libcephfs_jni.la -endif +endif # ENABLE_CEPHFS_JAVA endif # WITH_CEPHFS -bash_completiondir = $(sysconfdir)/bash_completion.d -bash_completion_DATA = $(srcdir)/bash_completion/ceph - -if WITH_RADOS -bash_completion_DATA += \ - $(srcdir)/bash_completion/rados - $(srcdir)/bash_completion/radosgw-admin -endif - -if WITH_RBD -bash_completion_DATA += \ - $(srcdir)/bash_completion/rbd \ -endif - -bin_SCRIPTS += \ - ceph \ - ceph-post-file - -if WITH_RBD -bin_SCRIPTS += \ - ceph-rbdnamer \ - rbd-replay-many -endif - -python_PYTHON += pybind/ceph_argparse.py - -if WITH_RADOS -python_PYTHON += pybind/rados.py -endif - -if WITH_RBD -python_PYTHON += pybind/rbd.py -endif - -if WITH_CEPHFS -python_PYTHON += pybind/cephfs.py -endif - -# assemble Python script with global version variables -# NB: depends on format of ceph_ver.h - -ceph: ceph.in ./ceph_ver.h Makefile - rm -f $@ $@.tmp - echo "#!/usr/bin/env python" >$@.tmp - grep "#define CEPH_GIT_NICE_VER" ./ceph_ver.h | \ - sed -e 's/#define \(.*VER\) /\1=/' >>$@.tmp - grep "#define CEPH_GIT_VER" ./ceph_ver.h | \ - sed -e 's/#define \(.*VER\) /\1=/' -e 's/=\(.*\)$$/="\1"/' >>$@.tmp - cat $(srcdir)/$@.in >>$@.tmp - chmod a+x $@.tmp - chmod a-w $@.tmp - mv $@.tmp $@ - -endif # ENABLE_CLIENT +endif # WITH_RADOS diff --git a/src/Makefile-rocksdb.am b/src/Makefile-rocksdb.am index d55126e76b5..7904c0ee313 100644 --- a/src/Makefile-rocksdb.am +++ b/src/Makefile-rocksdb.am @@ -369,4 +369,4 @@ else rocksdb/utilities/ttl/db_ttl_impl.cc \ rocksdb/utilities/ttl/db_ttl_impl.h \ rocksdb/utilities/ttl/ttl_test.cc -endif +endif # WITH_SLIBROCKSDB diff --git a/src/Makefile-server.am b/src/Makefile-server.am index 50955573193..3cd52298321 100644 --- a/src/Makefile-server.am +++ b/src/Makefile-server.am @@ -1,30 +1,3 @@ -if ENABLE_SERVER - -if WITH_MON -ceph_mon_SOURCES = ceph_mon.cc -ceph_mon_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) -bin_PROGRAMS += ceph-mon -endif - -if WITH_OSD -ceph_osd_SOURCES = ceph_osd.cc -ceph_osd_LDADD = $(LIBOSD) $(CEPH_GLOBAL) $(LIBCOMMON) -bin_PROGRAMS += ceph-osd -endif - -if WITH_MDS -ceph_mds_SOURCES = ceph_mds.cc -ceph_mds_LDADD = $(LIBMDS) $(LIBOSDC) $(CEPH_GLOBAL) $(LIBCOMMON) -bin_PROGRAMS += ceph-mds -endif - -mount_ceph_SOURCES = mount/mount.ceph.c -mount_ceph_LDADD = $(LIBSECRET) $(LIBCOMMON) -if LINUX -su_sbin_PROGRAMS += mount.ceph -endif # LINUX -su_sbin_SCRIPTS += mount.fuse.ceph - ceph_sbin_SCRIPTS = ceph-create-keys bin_SCRIPTS += \ @@ -33,7 +6,35 @@ bin_SCRIPTS += \ ceph-debugpack \ ceph-crush-location +python_PYTHON += pybind/ceph_rest_api.py + +shell_scripts += ceph-coverage + +bin_SCRIPTS += ceph-coverage + +BUILT_SOURCES += init-ceph + +shell_scripts += init-ceph + +mount_ceph_SOURCES = mount/mount.ceph.c +mount_ceph_LDADD = $(LIBSECRET) $(LIBCOMMON) +if LINUX +su_sbin_PROGRAMS += mount.ceph +endif # LINUX +su_sbin_SCRIPTS += mount.fuse.ceph + + +if WITH_MON + +ceph_mon_SOURCES = ceph_mon.cc +ceph_mon_LDADD = $(LIBMON) $(LIBOS) $(CEPH_GLOBAL) $(LIBCOMMON) +bin_PROGRAMS += ceph-mon + +endif # WITH_MON + + if WITH_OSD + ceph_sbin_SCRIPTS += \ ceph-disk \ ceph-disk-prepare \ @@ -42,22 +43,27 @@ ceph_sbin_SCRIPTS += \ bin_SCRIPTS += \ ceph-clsinfo -endif -python_PYTHON += pybind/ceph_rest_api.py +ceph_osd_SOURCES = ceph_osd.cc +ceph_osd_LDADD = $(LIBOSD) $(CEPH_GLOBAL) $(LIBCOMMON) +bin_PROGRAMS += ceph-osd + +endif # WITH_OSD + + +if WITH_MDS + +ceph_mds_SOURCES = ceph_mds.cc +ceph_mds_LDADD = $(LIBMDS) $(LIBOSDC) $(CEPH_GLOBAL) $(LIBCOMMON) +bin_PROGRAMS += ceph-mds + +endif # WITH_MDS -shell_scripts += ceph-coverage -bin_SCRIPTS += ceph-coverage if ENABLE_COVERAGE + COV_DIR = $(DESTDIR)$(libdir)/ceph/coverage COV_FILES = $(srcdir)/*.gcno COV_LIB_FILES = $(srcdir)/.libs/*.gcno -endif -BUILT_SOURCES += init-ceph - -shell_scripts += init-ceph - - -endif # ENABLE_SERVER +endif # ENABLE_COVERAGE diff --git a/src/Makefile.am b/src/Makefile.am index cd2931c7870..6d686ee01fa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,6 @@ SUBDIRS += ocf java tracing DIST_SUBDIRS += gmock ocf libs3 java tracing - # subdirs include arch/Makefile.am @@ -35,6 +34,7 @@ include key_value_store/Makefile.am include rbd_replay/Makefile.am include test/Makefile.am include tools/Makefile.am +include Makefile-rocksdb.am # shell scripts @@ -283,6 +283,11 @@ coverity-submit: scp project.tgz ceph.com:/home/ceph_site/ceph.com/coverity/`git describe`.tgz curl --data "project=ceph&password=`cat ~/coverity.build.pass.txt`&email=sage@newdream.net&url=http://ceph.com/coverity/`git describe`.tgz" http://scan5.coverity.com/cgi-bin/submit_build.py -include Makefile-rocksdb.am +if ENABLE_CLIENT include Makefile-client.am +endif + +if ENABLE_SERVER include Makefile-server.am +endif +