Makefile updates v3
Subsystems (2)
cover Makefile updates v3
Updated patch, which fixes some problems using buildir and taking created files from builddir.
Using INSTALL_PROGRAM and INSTALL_DATA commands.
Patch was tested on many combinations of different configure parameters without noticing any problems.
Zdenek Kabelac (3):
Do not use VPATH
INSTALL rules updates
Update intall rules for udev.
Makefile.in | 1 - configure.in | 16 ++++--- daemons/Makefile.in | 1 - daemons/clvmd/Makefile.in | 4 +- daemons/cmirrord/Makefile.in | 8 +-- daemons/dmeventd/Makefile.in | 48 ++++++----------------- daemons/dmeventd/plugins/Makefile.in | 1 - daemons/dmeventd/plugins/lvm2/Makefile.in | 12 +----- daemons/dmeventd/plugins/mirror/Makefile.in | 12 +----- daemons/dmeventd/plugins/snapshot/Makefile.in | 12 +----- doc/Makefile.in | 10 ++--- lib/Makefile.in | 3 +- lib/format1/Makefile.in | 11 +---- lib/format_pool/Makefile.in | 13 +----- lib/locking/Makefile.in | 12 +---- lib/mirror/Makefile.in | 11 +---- lib/snapshot/Makefile.in | 12 +---- libdm/Makefile.in | 52 +++++++----------------- liblvm/Makefile.in | 45 +++++---------------- make.tmpl.in | 53 +++++++++++++++++++------ man/Makefile.in | 52 +++++++++--------------- po/Makefile.in | 5 +- scripts/Makefile.in | 21 +++++----- test/Makefile.in | 2 +- test/api/Makefile.in | 1 - tools/Makefile.in | 50 +++++++++++------------- udev/Makefile.in | 28 ++++--------- 27 files changed, 183 insertions(+), 313 deletions(-)
PATCH 1/3 Do not use VPATH
Usage of VPATH makes troubles when used with builddir. Not only source files are being found through VPATH, but targets as well. (make --debug=v)
Thus if user builds the code in $(srcdir) and also in some $(builddir) he gets mangled results as some generated files (i.e. .export.sym) are 'reused' from $(srcdir) instead of $(builddir).
This patch switches to use vpath were we could explicitly name suffixes that should be looked via vpath - we must take care, we do not generate files with these suffixes:
.c, .in, .po, .exported_symbols
--- Makefile.in | 1 - daemons/Makefile.in | 1 - daemons/clvmd/Makefile.in | 1 - daemons/cmirrord/Makefile.in | 1 - daemons/dmeventd/Makefile.in | 1 - daemons/dmeventd/plugins/Makefile.in | 1 - daemons/dmeventd/plugins/lvm2/Makefile.in | 1 - daemons/dmeventd/plugins/mirror/Makefile.in | 1 - daemons/dmeventd/plugins/snapshot/Makefile.in | 1 - doc/Makefile.in | 3 +-- lib/Makefile.in | 1 - lib/format1/Makefile.in | 1 - lib/format_pool/Makefile.in | 1 - lib/locking/Makefile.in | 1 - lib/mirror/Makefile.in | 1 - lib/snapshot/Makefile.in | 1 - libdm/Makefile.in | 1 - liblvm/Makefile.in | 1 - make.tmpl.in | 6 ++++++ man/Makefile.in | 1 - po/Makefile.in | 1 - scripts/Makefile.in | 1 - test/api/Makefile.in | 1 - tools/Makefile.in | 3 +-- udev/Makefile.in | 3 ++- 25 files changed, 10 insertions(+), 26 deletions(-)
Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SUBDIRS = doc include man scripts
daemons/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ .PHONY: dmeventd clvmd cmirrord
daemons/clvmd/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ CCS_LIBS = @CCS_LIBS@ CCS_CFLAGS = @CCS_CFLAGS@
daemons/cmirrord/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ CPG_LIBS = @CPG_LIBS@ CPG_CFLAGS = @CPG_CFLAGS@
daemons/dmeventd/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES = libdevmapper-event.c SOURCES2 = dmeventd.c
daemons/dmeventd/plugins/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SUBDIRS += lvm2 mirror snapshot
daemons/dmeventd/plugins/lvm2/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ CLDFLAGS += -L$(top_builddir)/tools
daemons/dmeventd/plugins/mirror/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ INCLUDES += -I$(top_srcdir)/tools -I$(top_srcdir)/daemons/dmeventd/plugins/lvm2 CLDFLAGS += -L$(top_builddir)/tools -L$(top_builddir)/daemons/dmeventd/plugins/lvm2
daemons/dmeventd/plugins/snapshot/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ INCLUDES += -I$(top_srcdir)/tools -I$(top_srcdir)/daemons/dmeventd/plugins/lvm2 CLDFLAGS += -L$(top_builddir)/tools -L$(top_builddir)/daemons/dmeventd/plugins/lvm2
doc/Makefile.in +1 -2
@@ -14,9 +14,8 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ -CONFSRC=example.conf +CONFSRC=$(srcdir)/example.conf CONFDEST=lvm.conf include $(top_builddir)/make.tmpl
lib/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ ifeq ("@LVM1@", "shared") SUBDIRS = format1
lib/format1/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES =\ disk-rep.c \
lib/format_pool/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES =\ disk_rep.c \
lib/locking/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES = cluster_locking.c
lib/mirror/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES = mirrored.c
lib/snapshot/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES = snapshot.c
libdm/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES =\ datastruct/bitset.c \
liblvm/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES =\ lvm_misc.c \
make.tmpl.in +6 -0
@@ -63,6 +63,12 @@ localedir = $(DESTDIR)@LOCALEDIR@ staticdir = $(DESTDIR)@STATICDIR@ udevdir = $(DESTDIR)@udevdir@ +# Setup vpath search paths for some suffixes +vpath %.c $(srcdir) +vpath %.in $(srcdir) +vpath %.po $(srcdir) +vpath %.exported_symbols $(srcdir) + interface = @interface@ interfacebuilddir = $(top_builddir)/libdm/$(interface)
man/Makefile.in +0 -1
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ ifeq ("@FSADM@", "yes") FSADMMAN = fsadm.8
po/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ LANGS=de
scripts/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ include $(top_builddir)/make.tmpl
test/api/Makefile.in +0 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ ifeq ("@DEBUG@", "yes") DEFS += -DDEBUG
tools/Makefile.in +1 -2
@@ -15,7 +15,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ SOURCES =\ dumpconfig.c \
@@ -146,7 +145,7 @@ liblvm2cmd-static.a: $(top_builddir)/lib/liblvm-internal.a $(OBJECTS) lvmcmdlib. liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS) -.commands: commands.h cmdnames.h Makefile +.commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile $(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \ egrep -v '^ *(|#.*|dumpconfig|formats|help|pvdata|segtypes|version) *$$' > .commands
udev/Makefile.in +2 -1
@@ -14,7 +14,6 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -VPATH = @srcdir@ DM_RULES=10-dm.rules 13-dm-disk.rules 95-dm-notify.rules LVM_RULES=11-dm-lvm.rules
@@ -24,6 +23,8 @@ CLEAN_TARGETS=10-dm.rules include $(top_builddir)/make.tmpl +vpath %.rules $(srcdir) + %: %.in $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@
Signature · 1 line
1.7.0.1
PATCH 2/3 INSTALL rules updates
In reply to Zdenek KabelacPatch tries to address multiple issues.
It is inspired by Debian's extra patch but makes things more correct.
- removes OWNER & GROUP make vars they are parts of INSTALL command.
- adds INSTALL_PROGRAM for executable, uses $(INSTALL)
- adds INSTALL_DATA for non-executable data, uses ($INSTALL)
- adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL)
- adds configure option --enable-write_install - to support installatin of writable files used by distribution
- replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX)
- installs .a files from static builds without executable flag
- installs .a files to $(usrlibdir) instead of $(libdir)
- installs all static binaries to $(staticdir)
- create .so links for devel package in $(usrlibdir) instead of $(libdir)
- makes .so and .so.LIB_VERSION files within builddir
- removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly
- install LIB_SHARED via install_lib_shared target
- install plugins via install_lib_shared_plugin target
- prints whole 'install' command during installation instead of less informative "Installing $(something) $(somewhere)"
- install multiple man pages with one INSTALL command
- use DISTCLEAN_TARGETS instead of creating multiple distclean targets
--- configure.in | 16 ++++--- daemons/clvmd/Makefile.in | 3 +- daemons/cmirrord/Makefile.in | 7 +-- daemons/dmeventd/Makefile.in | 47 ++++++----------------- daemons/dmeventd/plugins/lvm2/Makefile.in | 11 +---- daemons/dmeventd/plugins/mirror/Makefile.in | 11 +---- daemons/dmeventd/plugins/snapshot/Makefile.in | 11 +---- doc/Makefile.in | 7 +-- lib/Makefile.in | 2 +- lib/format1/Makefile.in | 10 +--- lib/format_pool/Makefile.in | 12 +---- lib/locking/Makefile.in | 11 +---- lib/mirror/Makefile.in | 10 +--- lib/snapshot/Makefile.in | 11 +---- libdm/Makefile.in | 51 +++++++----------------- liblvm/Makefile.in | 44 +++++---------------- make.tmpl.in | 47 +++++++++++++++++------ man/Makefile.in | 51 +++++++++--------------- po/Makefile.in | 4 +- scripts/Makefile.in | 20 +++++---- test/Makefile.in | 2 +- tools/Makefile.in | 47 +++++++++++------------ 22 files changed, 166 insertions(+), 269 deletions(-)
configure.in +9 -7
@@ -144,28 +144,25 @@ AC_PREFIX_DEFAULT(/usr) ################################################################################ dnl -- Setup the ownership of the files AC_MSG_CHECKING(file owner) -OWNER="" - AC_ARG_WITH(user, [ --with-user=USER Set the owner of installed files [[USER=]] ], [ OWNER="$withval" ]) AC_MSG_RESULT($OWNER) if test x$OWNER != x; then - OWNER="-o $OWNER" + INSTALL="$INSTALL -o $OWNER" fi ################################################################################ dnl -- Setup the group ownership of the files AC_MSG_CHECKING(group owner) -GROUP="" AC_ARG_WITH(group, [ --with-group=GROUP Set the group owner of installed files [[GROUP=]] ], [ GROUP="$withval" ]) AC_MSG_RESULT($GROUP) if test x$GROUP != x; then - GROUP="-g $GROUP" + INSTALL="$INSTALL -g $GROUP" fi ################################################################################
@@ -733,6 +730,12 @@ AC_ARG_ENABLE(pkgconfig, [ --enable-pkgconfig Install pkgconfig support] PKGCONFIG=$enableval, PKGCONFIG=no) ################################################################################ +dnl -- Enable installation of writable files by user +AC_ARG_ENABLE(write_install, AC_HELP_STRING([--enable-write_install], + [Install user writable files]), + [WRITE_INSTALL=$enableval], [WRITE_INSTALL=no]) + +################################################################################ dnl -- Enable fsadm AC_MSG_CHECKING(whether to install fsadm) AC_ARG_ENABLE(fsadm, [AC_HELP_STRING([--disable-fsadm], [Disable fsadm])],
@@ -1080,7 +1083,6 @@ AC_SUBST(DM_IOCTLS) AC_SUBST(DM_LIB_VERSION) AC_SUBST(DM_LIB_PATCHLEVEL) AC_SUBST(FSADM) -AC_SUBST(GROUP) AC_SUBST(GULM_CFLAGS) AC_SUBST(GULM_LIBS) AC_SUBST(HAVE_LIBDL)
@@ -1103,7 +1105,6 @@ AC_SUBST(LVM_RELEASE) AC_SUBST(LVM_RELEASE_DATE) AC_SUBST(MIRRORS) AC_SUBST(MSGFMT) -AC_SUBST(OWNER) AC_SUBST(PKGCONFIG) AC_SUBST(POOL) AC_SUBST(PTHREAD_LIBS)
@@ -1121,6 +1122,7 @@ AC_SUBST(STATIC_LINK) AC_SUBST(UDEV_LIBS) AC_SUBST(UDEV_RULES) AC_SUBST(UDEV_SYNC) +AC_SUBST(WRITE_INSTALL) AC_SUBST(interface) AC_SUBST(kerneldir) AC_SUBST(missingkernel)
daemons/clvmd/Makefile.in +1 -2
@@ -110,8 +110,7 @@ clvmd: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a .PHONY: install_clvmd install_clvmd: $(TARGETS) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) clvmd \ - $(usrsbindir)/clvmd + $(INSTALL_PROGRAM) -D clvmd $(usrsbindir)/clvmd install: $(INSTALL_TARGETS)
daemons/cmirrord/Makefile.in +3 -4
@@ -1,5 +1,5 @@ # -# Copyright (C) 2009 Red Hat, Inc. All rights reserved. +# Copyright (C) 2009-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -31,9 +31,8 @@ LMLIBS += $(CPG_LIBS) $(SACKPT_LIBS) CFLAGS += $(CPG_CFLAGS) $(SACKPT_CFLAGS) cmirrord: $(OBJECTS) $(top_builddir)/lib/liblvm-internal.a - $(CC) $(CFLAGS) $(LDFLAGS) -o cmirrord $(OBJECTS) \ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) \ $(LVMLIBS) $(LMLIBS) $(LIBS) install: $(TARGETS) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) cmirrord \ - $(usrsbindir)/cmirrord + $(INSTALL_PROGRAM) -D cmirrord $(usrsbindir)/cmirrord
daemons/dmeventd/Makefile.in +12 -35
77 lines not on this page · raw message
daemons/dmeventd/plugins/lvm2/Makefile.in +2 -9
@@ -19,20 +19,13 @@ CLDFLAGS += -L$(top_builddir)/tools SOURCES = dmeventd_lvm.c -ifeq ("@LIB_SUFFIX@","dylib") - LIB_SHARED = libdevmapper-event-lvm2.dylib -else - LIB_SHARED = libdevmapper-event-lvm2.so -endif +LIB_SHARED = libdevmapper-event-lvm2.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl LIBS += @LVM2CMD_LIB@ -ldevmapper $(PTHREAD_LIBS) -install_lvm2: libdevmapper-event-lvm2.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/$<.$(LIB_VERSION) - $(LN_S) -f $<.$(LIB_VERSION) $(libdir)/$< +install_lvm2: install_lib_shared install: install_lvm2
daemons/dmeventd/plugins/mirror/Makefile.in +2 -9
@@ -22,12 +22,7 @@ CLDFLAGS += -L$(top_builddir)/tools -L$(top_builddir)/daemons/dmeventd/plugins/l SOURCES = dmeventd_mirror.c LIB_NAME = libdevmapper-event-lvm2mirror -ifeq ("@LIB_SUFFIX@","dylib") - LIB_SHARED = $(LIB_NAME).dylib -else - LIB_SHARED = $(LIB_NAME).so -endif - +LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) CFLOW_LIST = $(SOURCES)
@@ -37,8 +32,6 @@ include $(top_builddir)/make.tmpl LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS) -install_lvm2: $(LIB_NAME).$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/$< +install_lvm2: install_lib_shared_plugin install: install_lvm2
daemons/dmeventd/plugins/snapshot/Makefile.in +2 -9
@@ -21,20 +21,13 @@ CLDFLAGS += -L$(top_builddir)/tools -L$(top_builddir)/daemons/dmeventd/plugins/l SOURCES = dmeventd_snapshot.c -ifeq ("@LIB_SUFFIX@","dylib") - LIB_SHARED = libdevmapper-event-lvm2snapshot.dylib -else - LIB_SHARED = libdevmapper-event-lvm2snapshot.so -endif - +LIB_SHARED = libdevmapper-event-lvm2snapshot.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS) -install_lvm2: libdevmapper-event-lvm2snapshot.$(LIB_SUFFIX) - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/$< +install_lvm2: install_lib_shared_plugin install: install_lvm2
doc/Makefile.in +3 -4
@@ -1,5 +1,5 @@ # -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -22,9 +22,8 @@ include $(top_builddir)/make.tmpl install_lvm2: $(CONFSRC) @if [ ! -e $(confdir)/$(CONFDEST) ]; then \ - echo "Installing $(CONFSRC) as $(confdir)/$(CONFDEST)"; \ - @INSTALL@ -D $(OWNER) $(GROUP) -m 644 $< \ - $(confdir)/$(CONFDEST); \ + echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST)"; \ + $(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST); \ fi install: install_lvm2
lib/Makefile.in +1 -1
@@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
lib/format1/Makefile.in +3 -7
@@ -1,6 +1,6 @@ # # Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -25,13 +25,9 @@ SOURCES =\ lvm1-label.c \ vg_number.c -LIB_SHARED = liblvm2format1.so +LIB_SHARED = liblvm2format1.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl -install: liblvm2format1.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2format1.so.$(LIB_VERSION) - $(LN_S) -f liblvm2format1.so.$(LIB_VERSION) $(libdir)/liblvm2format1.so - +install: install_lib_shared_plugin
lib/format_pool/Makefile.in +3 -9
@@ -1,6 +1,6 @@ # # Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -22,15 +22,9 @@ SOURCES =\ import_export.c \ pool_label.c -LIB_SHARED = liblvm2formatpool.so +LIB_SHARED = liblvm2formatpool.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl -install: liblvm2formatpool.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2formatpool.so.$(LIB_VERSION) - $(LN_S) -f liblvm2formatpool.so.$(LIB_VERSION) \ - $(libdir)/liblvm2formatpool.so - - +install: install_lib_shared_plugin
lib/locking/Makefile.in +3 -8
@@ -1,6 +1,6 @@ # # Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -18,14 +18,9 @@ top_builddir = @top_builddir@ SOURCES = cluster_locking.c -LIB_SHARED = liblvm2clusterlock.so +LIB_SHARED = liblvm2clusterlock.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl -install install_cluster: liblvm2clusterlock.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2clusterlock.so.$(LIB_VERSION) - $(LN_S) -f liblvm2clusterlock.so.$(LIB_VERSION) \ - $(libdir)/liblvm2clusterlock.so - +install install_cluster: install_lib_shared_plugin
lib/mirror/Makefile.in +3 -7
@@ -1,6 +1,6 @@ # # Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -18,13 +18,9 @@ top_builddir = @top_builddir@ SOURCES = mirrored.c -LIB_SHARED = liblvm2mirror.so +LIB_SHARED = liblvm2mirror.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl -install: liblvm2mirror.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2mirror.so.$(LIB_VERSION) - $(LN_S) -f liblvm2mirror.so.$(LIB_VERSION) $(libdir)/liblvm2mirror.so - +install: install_lib_shared_plugin
lib/snapshot/Makefile.in +3 -8
@@ -1,6 +1,6 @@ # # Copyright (C) 2002-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -18,14 +18,9 @@ top_builddir = @top_builddir@ SOURCES = snapshot.c -LIB_SHARED = liblvm2snapshot.so +LIB_SHARED = liblvm2snapshot.$(LIB_SUFFIX) LIB_VERSION = $(LIB_VERSION_LVM) include $(top_builddir)/make.tmpl -install: liblvm2snapshot.so - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/liblvm2snapshot.so.$(LIB_VERSION) - $(LN_S) -f liblvm2snapshot.so.$(LIB_VERSION) \ - $(libdir)/liblvm2snapshot.so - +install: install_lib_shared_plugin
libdm/Makefile.in +15 -36
80 lines not on this page · raw message
liblvm/Makefile.in +11 -33
80 lines not on this page · raw message
make.tmpl.in +35 -12
80 lines not on this page · raw message
man/Makefile.in +19 -32
67 lines not on this page · raw message
po/Makefile.in +2 -2
@@ -53,13 +53,13 @@ install: $(TARGETS) @echo Installing translation files in $(localedir) @( \ for lang in $(LANGS); do \ - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \ + $(INSTALL_DATA) -D $$lang.mo \ $(localedir)/$$lang/LC_MESSAGES/lvm2.mo;\ done; \ ) @( \ for lang in $(LANGS); do \ - $(INSTALL) -D $(OWNER) $(GROUP) -m 444 $$lang.mo \ + $(INSTALL_DATA) -D $$lang.mo \ $(localedir)/$$lang/LC_MESSAGES/device-mapper.mo;\ done; \ )
scripts/Makefile.in +11 -9
@@ -1,5 +1,5 @@ # -# Copyright (C) 2006 Red Hat, Inc. All rights reserved. +# Copyright (C) 2006-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -17,16 +17,18 @@ top_builddir = @top_builddir@ include $(top_builddir)/make.tmpl -install: - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/lvm_dump.sh \ - $(sbindir)/lvmdump - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/vgimportclone.sh \ - $(sbindir)/vgimportclone +SCRIPTS = lvm_dump.sh vgimportclone.sh ifeq ("@FSADM@", "yes") - $(INSTALL) -D $(OWNER) $(GROUP) -m 555 $(srcdir)/fsadm.sh \ - $(sbindir)/fsadm + SCRIPTS += fsadm.sh endif -install_lvm2: install +vpath %.sh $(srcdir) + +%_install: %.sh + $(INSTALL_PROGRAM) -D $< $(sbindir)/$(basename $(<F)) + +install_lvm2: $(SCRIPTS:.sh=_install) + +install: install_lvm2 DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat
test/Makefile.in +1 -1
@@ -1,4 +1,4 @@ -# Copyright (C) 2007 Red Hat, Inc. All rights reserved. +# Copyright (C) 2007-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
tools/Makefile.in +22 -25
89 lines not on this page · raw message
Signature · 1 line
1.7.0.1
PATCH 3/3 Update intall rules for udev.
In reply to Zdenek KabelacFix unwanted modification of $(top_builddir)/make.tmpl.
Using dependency rules to install rules for udev. There is minor problem, with concurent usage of builddir and srcdir could lead to missuse of 10-dm.rules which could be found in VPATH from different builddir. However current solution uses intermediate target so the generated 10-dm.rules exists only for short period of time during make install execution.
--- udev/Makefile.in | 25 +++++++------------------ 1 files changed, 7 insertions(+), 18 deletions(-)
udev/Makefile.in +7 -18
@@ -1,5 +1,5 @@ # -# Copyright (C) 2009 Red Hat, Inc. All rights reserved. +# Copyright (C) 2009-2010 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -25,24 +25,13 @@ include $(top_builddir)/make.tmpl vpath %.rules $(srcdir) -%: %.in +%.rules: %.rules.in $(SED) -e "s/(DM_DIR)/$(DM_DIR)/" $< >$@ -install_lvm2: $(LVM_RULES) - @echo "Installing $(LVM_RULES) in $(udevdir)" - @for f in $(LVM_RULES); \ - do \ - $(RM) $(udevdir)/$$f; \ - $(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $(srcdir)/$$f $(udevdir)/$$f; \ - done - -install_device-mapper: $(DM_RULES) - @echo "Installing $(DM_RULES) in $(udevdir)" - @for f in $(DM_RULES); \ - do \ - $(RM) $(udevdir)/$$f; \ - if test -f $$f; then file=$$f; else file=$(srcdir)/$$f; fi; \ - $(INSTALL) -c -D $(OWNER) $(GROUP) -m 644 $$file $(udevdir)/$$f; \ - done +%_install: %.rules + $(INSTALL_DATA) -D $< $(udevdir)/$(<F) + +install_device-mapper: $(DM_RULES:.rules=_install) +install_lvm2: $(LVM_RULES:.rules=_install) install: install_lvm2 install_device-mapper
Signature · 1 line
1.7.0.1
cover Makefile updates v3
In reply to Zdenek KabelacWell there are some signicant changes there.
Check it in and we'll find out what breaks...
Alasdair