diff --git a/Makefile.in b/Makefile.in index 246a05ba2..fc09f6f63 100644 --- a/Makefile.in +++ b/Makefile.in @@ -34,12 +34,9 @@ ifeq ("@APPLIB@", "yes") endif ifeq ($(MAKECMDGOALS),distclean) - SUBDIRS += liblvm \ - udev \ - test/api \ - test \ - po - DISTCLEAN_TARGETS += lib/misc/configure.h lib/misc/lvm-version.h + SUBDIRS = doc include man scripts \ + lib tools daemons libdm \ + udev po liblvm test/api test DISTCLEAN_DIRS += lcov_reports* endif diff --git a/WHATS_NEW b/WHATS_NEW index bf6c8e69d..cfa655053 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.63 - ================================ + Improved dependency tracking for dmeventd and liblvm2cmd sources. + Improved Makefile rules for distclean and cflow targets. Add ability to create mirrored logs for mirror LVs. Use a real socket for singlenode clvmd to fix clvmd's high cpu load. Fix clvmd cluster propagation of dmeventd monitoring mode. diff --git a/daemons/clvmd/Makefile.in b/daemons/clvmd/Makefile.in index 56785041a..e3f70d5a8 100644 --- a/daemons/clvmd/Makefile.in +++ b/daemons/clvmd/Makefile.in @@ -76,6 +76,14 @@ ifneq (,$(findstring singlenode,, "@CLVMD@,")) DEFS += -DUSE_SINGLENODE endif +ifeq ($(MAKECMDGOALS),distclean) + SOURCES += clvmd-gulm.c tcp-comms.c + SOURCES += clvmd-cman.c + SOURCES += clvmd-openais.c + SOURCES += clvmd-corosync.c + SOURCES += clvmd-singlenode.c +endif + TARGETS = \ clvmd @@ -109,4 +117,3 @@ install_clvmd: $(TARGETS) install: $(INSTALL_TARGETS) install_cluster: $(INSTALL_TARGETS) - diff --git a/daemons/dmeventd/Makefile.in b/daemons/dmeventd/Makefile.in index fa51bd530..cd2a4d36e 100644 --- a/daemons/dmeventd/Makefile.in +++ b/daemons/dmeventd/Makefile.in @@ -17,6 +17,8 @@ top_builddir = @top_builddir@ VPATH = @srcdir@ SOURCES = libdevmapper-event.c +SOURCES2 = dmeventd.c + TARGETS = dmeventd .PHONY: install_lib_dynamic install_lib_static install_include \ @@ -118,10 +120,9 @@ install: install_include install_lib install_dmeventd install_device-mapper: install_include install_lib install_dmeventd -.PHONY: distclean_lib distclean +.PHONY: distclean_lib distclean_lib: $(RM) libdevmapper-event.pc distclean: distclean_lib - diff --git a/lib/Makefile.in b/lib/Makefile.in index 349dedc30..acfb23ed1 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -165,3 +165,5 @@ CFLOW_LIST_TARGET = $(LIB_NAME).cflow include $(top_builddir)/make.tmpl $(SUBDIRS): $(LIB_STATIC) + +DISTCLEAN_TARGETS += misc/configure.h misc/lvm-version.h diff --git a/libdm/Makefile.in b/libdm/Makefile.in index c20a3bf14..63e6603f9 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -106,9 +106,9 @@ $(VERSIONED_SHLIB): %.$(LIB_SUFFIX).$(LIB_VERSION_DM): $(interface)/%.$(LIB_SUFF rm -f libdevmapper.$(LIB_SUFFIX) $(LN_S) $< libdevmapper.$(LIB_SUFFIX) -CLEAN_TARGETS += libdevmapper.$(LIB_SUFFIX) +CLEAN_TARGETS += libdevmapper.$(LIB_SUFFIX) ioctl/libdevmapper.a -.PHONY: distclean_lib distclean +.PHONY: distclean_lib distclean_lib: $(RM) libdevmapper.pc diff --git a/make.tmpl.in b/make.tmpl.in index e91857c2f..8b93bb137 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -301,12 +301,12 @@ $(LIB_STATIC): $(OBJECTS) $(MSGFMT) -o $@ $< clean: $(SUBDIRS.clean) - $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(SOURCES:%.c=%.d) \ - $(SOURCES2:%.c=%.d) $(SOURCES:%.c=%.pot) $(SOURCES:%.c=%.gcno) \ - $(SOURCES:%.c=%.gcda) $(LDDEPS) $(CLEAN_CFLOW) + $(RM) $(OBJECTS) $(TARGETS) $(CLEAN_TARGETS) $(CLEAN_CFLOW) $(LDDEPS) \ + $(POTFILES) $(SOURCES:%.c=%.d) $(SOURCES:%.c=%.gcno) $(SOURCES:%.c=%.gcda) \ + $(SOURCES2:%.c=%.o) $(SOURCES2:%.c=%.d) $(SOURCES2:%.c=%.gcno) $(SOURCES2:%.c=%.gcda) distclean: clean $(SUBDIRS.distclean) - $(RM) -rf $(DISTCLEAN_DIRS) + $(RM) -r $(DISTCLEAN_DIRS) $(RM) $(DISTCLEAN_TARGETS) \ config.cache config.log config.status \ Makefile make.tmpl core \ @@ -317,15 +317,11 @@ distclean: clean $(SUBDIRS.distclean) sed "s/^/ /;s/$$/;/" < $<; \ echo " local:"; echo " *;"; echo "};") > $@ -ifneq ($(MAKECMDGOALS),cflow) -ifneq ($(MAKECMDGOALS),clean) - ifneq ($(MAKECMDGOALS),distclean) +ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean)) ifdef SOURCES -include $(SOURCES:.c=.d) endif ifdef SOURCES2 -include $(SOURCES2:.c=.d) endif - endif -endif endif diff --git a/man/Makefile.in b/man/Makefile.in index 332f07fe6..06846ea8e 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -47,6 +47,7 @@ MAN5DIR=$(mandir)/man5 MAN8DIR=$(mandir)/man8 CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) $(MAN8DM) +DISTCLEAN_TARGETS=fsadm.8 clvmd.8 cmirrord.8 include $(top_builddir)/make.tmpl diff --git a/test/Makefile.in b/test/Makefile.in index 56c2d3cf8..6b43ab17e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -28,14 +28,16 @@ abs_top_srcdir = @abs_top_srcdir@ # Shell quote; SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) -T = $(wildcard $(srcdir)/t-*.sh) +SCRIPTS := $(wildcard $(srcdir)/t-*.sh) \ + $(srcdir)/test-utils.sh \ + $(srcdir)/test-lib.sh ifeq ("@UDEV_SYNC@", "yes") dm_udev_synchronisation = 1 endif ifeq ("@APPLIB@", "yes") -T += $(srcdir)/lvm2app.sh +SCRIPTS += $(srcdir)/lvm2app.sh all: api/vgtest api/vgtest: $(MAKE) -C api vgtest @@ -66,9 +68,7 @@ init.sh: $(srcdir)/Makefile.in $(srcdir)/test-utils.sh .bin-dir-stamp bin/not bi echo 'export DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t chmod a-w $@-t mv $@-t $@ - if test "$(srcdir)" != "."; then cp $(srcdir)/test-utils.sh \ - $(srcdir)/test-lib.sh \ - $(T) .; fi + test "$(srcdir)" != . && cp $(SCRIPTS) . Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -95,9 +95,9 @@ lvm-wrapper: Makefile clean: rm -rf init.sh lvm-wrapper bin .bin-dir-stamp + test "$(srcdir)" != . && rm -f $(subst $(srcdir)/, ,$(SCRIPTS)) lvm2app.sh distclean: clean rm -f Makefile -.PHONY: clean distclean .NOTPARALLEL: diff --git a/tools/Makefile.in b/tools/Makefile.in index 71e00efab..5a0a1d68d 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. # @@ -64,10 +64,15 @@ SOURCES =\ vgsplit.c SOURCES2 =\ - dmsetup.c + dmsetup.c \ + lvm.c \ + lvm2cmd-static.c \ + lvm2cmd.c \ + lvmcmdlib.c TARGETS =\ .commands \ + liblvm2cmd.a \ lvm TARGETS_DM = dmsetup @@ -87,9 +92,8 @@ endif LVMLIBS = $(LVMINTERNAL_LIBS) LIB_VERSION = $(LIB_VERSION_LVM) -CLEAN_TARGETS = liblvm2cmd.$(LIB_SUFFIX) liblvm2cmd.a liblvm2cmd-static.a lvm lvm.o \ - lvm2cmd.o lvm2cmd-static.o lvm2cmdlib.o lvm.static \ - lvmcmdlib.o lvm-static.o dmsetup.o $(TARGETS_DM) +CLEAN_TARGETS = liblvm2cmd.$(LIB_SUFFIX) $(TARGETS_DM) \ + liblvm2cmd-static.a dmsetup.static lvm.static ifeq ("@CMDLIB@", "yes") TARGETS += liblvm2cmd.$(LIB_SUFFIX) @@ -146,15 +150,16 @@ liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS) $(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \ egrep -v '^ *(|#.*|dumpconfig|formats|help|pvdata|segtypes|version) *$$' > .commands -.PHONY: install_cmdlib_dynamic install_cmdlib_static \ - install_tools_dynamic install_tools_static - ifneq ("$(CFLOW_CMD)", "") CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES)) -include $(top_builddir)/libdm/libdevmapper.cflow -include $(top_builddir)/lib/liblvm-internal.cflow endif +.PHONY: install_cmdlib_dynamic install_cmdlib_static \ + install_tools_dynamic install_tools_static \ + install_dmsetup_dynamic install_dmsetup_static + install_cmdlib_dynamic: liblvm2cmd.$(LIB_SUFFIX) $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ $(libdir)/liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION)