diff --git a/configure b/configure index 020f23da6..4a05ccb96 100755 --- a/configure +++ b/configure @@ -10212,7 +10212,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'` ################################################################################ -ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/lvmetad/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile" +ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/common/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/lvmetad/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -10906,6 +10906,7 @@ do "daemons/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/Makefile" ;; "daemons/clvmd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/clvmd/Makefile" ;; "daemons/cmirrord/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/cmirrord/Makefile" ;; + "daemons/common/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/common/Makefile" ;; "daemons/dmeventd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/Makefile" ;; "daemons/dmeventd/libdevmapper-event.pc") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/libdevmapper-event.pc" ;; "daemons/dmeventd/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/Makefile" ;; diff --git a/configure.in b/configure.in index 244bfc85e..5275b9506 100644 --- a/configure.in +++ b/configure.in @@ -1410,6 +1410,7 @@ make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile +daemons/common/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile diff --git a/daemons/Makefile.in b/daemons/Makefile.in index c1f5b6f01..380ea0c3d 100644 --- a/daemons/Makefile.in +++ b/daemons/Makefile.in @@ -16,13 +16,10 @@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ ifeq ("@BUILD_LVMETAD@", "yes") - SUBDIRS += lvmetad - -LIB_STATIC = libdaemon.a -SOURCES = common/daemon-shared.c common/daemon-server.c common/daemon-client.c + SUBDIRS += common lvmetad endif -.PHONY: dmeventd clvmd cmirrord lvmetad +.PHONY: dmeventd clvmd common cmirrord lvmetad ifneq ("@CLVMD@", "none") SUBDIRS += clvmd @@ -40,7 +37,7 @@ endif endif ifeq ($(MAKECMDGOALS),distclean) - SUBDIRS = clvmd cmirrord dmeventd lvmetad + SUBDIRS = clvmd cmirrord common dmeventd lvmetad endif include $(top_builddir)/make.tmpl @@ -50,7 +47,6 @@ device-mapper: dmeventd.device-mapper endif ifeq ("@BUILD_LVMETAD@", "yes") -device-mapper: lvmetad.device-mapper -lvmetad.device-mapper: $(LIB_STATIC) +lvmetad: common.device-mapper endif diff --git a/daemons/common/Makefile.in b/daemons/common/Makefile.in new file mode 100644 index 000000000..8cf806194 --- /dev/null +++ b/daemons/common/Makefile.in @@ -0,0 +1,22 @@ +# Copyright (C) 2011 Red Hat, Inc. All rights reserved. +# +# This file is part of the device-mapper userspace tools. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU Lesser General Public License v.2.1. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +LIB_STATIC = libdaemon.a +SOURCES = daemon-shared.c daemon-server.c daemon-client.c + +include $(top_builddir)/make.tmpl + +device-mapper: $(LIB_STATIC) diff --git a/daemons/lvmetad/Makefile.in b/daemons/lvmetad/Makefile.in index bf9635720..9600a1fd8 100644 --- a/daemons/lvmetad/Makefile.in +++ b/daemons/lvmetad/Makefile.in @@ -22,8 +22,6 @@ TARGETS = lvmetad lvmetad-testclient .PHONY: install_lvmetad INCLUDES += -I$(top_srcdir)/daemons/common -INSTALL_LVMETAD_TARGETS = install_lvmetad -CLEAN_TARGETS = lvmetad lvmetad-testclient CFLOW_LIST = $(SOURCES) CFLOW_LIST_TARGET = $(LIB_NAME).cflow @@ -31,12 +29,10 @@ CFLOW_TARGET = lvmetad include $(top_builddir)/make.tmpl -device-mapper: $(TARGETS) - LIBS += -ldevmapper -ldaemon $(PTHREAD_LIBS) lvmetad: lvmetad-core.o - $(CC) $(CFLAGS) $(LDFLAGS) -L$(top_builddir)/daemons -o $@ lvmetad-core.o \ + $(CC) $(CFLAGS) $(LDFLAGS) -L$(top_builddir)/daemons/common -o $@ lvmetad-core.o \ $(DL_LIBS) $(LVMLIBS) $(LIBS) -rdynamic # TODO: No idea. No idea how to test either. @@ -52,6 +48,6 @@ lvmetad: lvmetad-core.o install_lvmetad: lvmetad $(INSTALL_PROGRAM) -D $< $(sbindir)/$(