From e0c64c6c35e7d673a627a3487e3d30f2f7c79c53 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Fri, 6 Mar 2009 16:19:52 +0000 Subject: [PATCH] Add new liblvm build directory and move lvm_base.c. The original liblvm.a has been moved to liblvm-internal.a. We now use liblvm.a for the new application library and build it inside liblvm directory. Change dependencies so tools depend on liblvm application library, and application library depends on liblvm internal. --- Makefile.in | 5 +++-- WHATS_NEW | 1 + configure | 3 ++- configure.in | 1 + lib/Makefile.in | 3 +-- liblvm/Makefile.in | 36 ++++++++++++++++++++++++++++++++++++ {lib => liblvm}/lvm_base.c | 0 7 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 liblvm/Makefile.in rename {lib => liblvm}/lvm_base.c (100%) diff --git a/Makefile.in b/Makefile.in index 07f22c675..018e81264 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,7 +22,7 @@ ifeq ("@INTL@", "yes") SUBDIRS += po endif -SUBDIRS += lib tools daemons libdm +SUBDIRS += lib tools daemons libdm liblvm ifeq ($(MAKECMDGOALS),distclean) SUBDIRS += daemons/clvmd \ @@ -42,8 +42,9 @@ include make.tmpl libdm: include lib: libdm +liblvm: lib daemons: lib tools -tools: lib device-mapper +tools: lib device-mapper liblvm po: tools daemons libdm.device-mapper: include.device-mapper diff --git a/WHATS_NEW b/WHATS_NEW index e039108f8..0b966510b 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.46 - ================================ + Rename liblvm.a to liblvm-internal.a and build new application library. Flush memory pool and fix locking in clvmd refresh and backup command. Fix unlocks in clvmd-corosync. Broken in 2.02.45. diff --git a/configure b/configure index 64afd3c47..dbc92630b 100755 --- a/configure +++ b/configure @@ -12659,7 +12659,7 @@ LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '.' '{print $3}'` ################################################################################ -ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile" +ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -13278,6 +13278,7 @@ do "lib/snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES lib/snapshot/Makefile" ;; "libdm/Makefile") CONFIG_FILES="$CONFIG_FILES libdm/Makefile" ;; "libdm/libdevmapper.pc") CONFIG_FILES="$CONFIG_FILES libdm/libdevmapper.pc" ;; + "liblvm/Makefile") CONFIG_FILES="$CONFIG_FILES liblvm/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;; diff --git a/configure.in b/configure.in index 1eaa2a072..f84d58918 100644 --- a/configure.in +++ b/configure.in @@ -835,6 +835,7 @@ lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc +liblvm/Makefile man/Makefile po/Makefile scripts/clvmd_init_red_hat diff --git a/lib/Makefile.in b/lib/Makefile.in index 0d5ee94ac..ee1f8ff93 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -86,8 +86,7 @@ SOURCES =\ report/report.c \ striped/striped.c \ uuid/uuid.c \ - zero/zero.c \ - lvm_base.c + zero/zero.c ifeq ("@LVM1@", "internal") SOURCES +=\ diff --git a/liblvm/Makefile.in b/liblvm/Makefile.in new file mode 100644 index 000000000..6f90f6a5b --- /dev/null +++ b/liblvm/Makefile.in @@ -0,0 +1,36 @@ +# +# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. +# Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. +# +# This file is part of LVM2. +# +# 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 General Public License v.2. +# +# You should have received a copy of the GNU 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@ +VPATH = @srcdir@ + +SOURCES =\ + lvm_base.c + +LIB_STATIC = liblvm.a + +$(SUBDIRS): $(LIB_STATIC) + +CLEAN_TARGETS += liblvm.cflow + +include $(top_srcdir)/make.tmpl + +liblvm.cflow: $(SOURCES) + set -e; (echo -n "SOURCES += "; \ + echo $(SOURCES) | \ + sed "s/^/ /;s/ / $(top_srcdir)\/lib\//g;s/$$//"; \ + ) > $@ + +cflow: liblvm.cflow diff --git a/lib/lvm_base.c b/liblvm/lvm_base.c similarity index 100% rename from lib/lvm_base.c rename to liblvm/lvm_base.c