1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Use vpath instead of VPATH.

Usage of VPATH makes troubles when used within $(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
This commit is contained in:
Zdenek Kabelac 2010-04-09 21:34:25 +00:00
parent 1485ce69c4
commit c737d34804
26 changed files with 11 additions and 26 deletions

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SUBDIRS = doc include man scripts

View File

@ -1,5 +1,6 @@
Version 2.02.63 -
================================
Switch from using VPATH to vpath in Makefiles.
Permit mimage LVs to be striped in lvcreate and lvresize.
Fix pvmove allocation to take existing parallel stripes into account.
Add pvmove_source_seg to struct lv_segment.

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
.PHONY: dmeventd clvmd cmirrord

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
CCS_LIBS = @CCS_LIBS@
CCS_CFLAGS = @CCS_CFLAGS@

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
CPG_LIBS = @CPG_LIBS@
CPG_CFLAGS = @CPG_CFLAGS@

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES = libdevmapper-event.c
SOURCES2 = dmeventd.c

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SUBDIRS += lvm2 mirror snapshot

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
CLDFLAGS += -L$(top_builddir)/tools

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
ifeq ("@LVM1@", "shared")
SUBDIRS = format1

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES =\
disk-rep.c \

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES =\
disk_rep.c \

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES = cluster_locking.c

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES = mirrored.c

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES = snapshot.c

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES =\
datastruct/bitset.c \

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
SOURCES =\
lvm_misc.c \

View File

@ -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)

View File

@ -15,7 +15,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
ifeq ("@FSADM@", "yes")
FSADMMAN = fsadm.8

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
LANGS=de

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
include $(top_builddir)/make.tmpl

View File

@ -14,7 +14,6 @@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
ifeq ("@DEBUG@", "yes")
DEFS += -DDEBUG

View File

@ -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

View File

@ -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)/" $< >$@