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

Install plugins to subdirs

Target install_dm_plugin installs files to libdir/device-mapper.
Target install_lvm2_plugin installs files to libdir/lvm2.

Both targets creates relative links to libdir to keep the code
compatible with current dlopen handling.

Once we will be able to read plugins from subdir, links
could be removed.
This commit is contained in:
Zdenek Kabelac 2010-05-06 10:07:46 +00:00
parent 2f01958e3e
commit 180b3dea11
8 changed files with 20 additions and 11 deletions

View File

@ -32,6 +32,6 @@ include $(top_builddir)/make.tmpl
LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS) LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS)
install_lvm2: install_lib_shared_plugin install_lvm2: install_dm_plugin
install: install_lvm2 install: install_lvm2

View File

@ -28,6 +28,6 @@ include $(top_builddir)/make.tmpl
LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS) LIBS += @LVM2CMD_LIB@ -ldevmapper-event-lvm2 -ldevmapper $(PTHREAD_LIBS)
install_lvm2: install_lib_shared_plugin install_lvm2: install_dm_plugin
install: install_lvm2 install: install_lvm2

View File

@ -30,4 +30,4 @@ LIB_VERSION = $(LIB_VERSION_LVM)
include $(top_builddir)/make.tmpl include $(top_builddir)/make.tmpl
install: install_lib_shared_plugin install: install_lvm2_plugin

View File

@ -27,4 +27,4 @@ LIB_VERSION = $(LIB_VERSION_LVM)
include $(top_builddir)/make.tmpl include $(top_builddir)/make.tmpl
install: install_lib_shared_plugin install: install_lvm2_plugin

View File

@ -23,4 +23,4 @@ LIB_VERSION = $(LIB_VERSION_LVM)
include $(top_builddir)/make.tmpl include $(top_builddir)/make.tmpl
install install_cluster: install_lib_shared_plugin install install_cluster: install_lvm2_plugin

View File

@ -23,4 +23,4 @@ LIB_VERSION = $(LIB_VERSION_LVM)
include $(top_builddir)/make.tmpl include $(top_builddir)/make.tmpl
install: install_lib_shared_plugin install: install_lvm2_plugin

View File

@ -23,4 +23,4 @@ LIB_VERSION = $(LIB_VERSION_LVM)
include $(top_builddir)/make.tmpl include $(top_builddir)/make.tmpl
install: install_lib_shared_plugin install: install_lvm2_plugin

View File

@ -163,7 +163,7 @@ POTFILES = $(SOURCES:%.c=%.pot)
.PHONY: all pofile distclean clean cleandir cflow device-mapper .PHONY: all pofile distclean clean cleandir cflow device-mapper
.PHONY: install install_cluster install_device-mapper install_lvm2 .PHONY: install install_cluster install_device-mapper install_lvm2
.PHONY: install_lib_shared install_lib_shared_plugin .PHONY: install_lib_shared install_dm_plugin install_lvm2_plugin
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean) .PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
.PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow) .PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow)
.PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper) .PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper)
@ -306,9 +306,18 @@ install_lib_shared: $(LIB_SHARED)
$(INSTALL) -d $(usrlibdir) $(INSTALL) -d $(usrlibdir)
$(LN_S) -f $(USRLIB_RELPATH)$(<F).$(LIB_VERSION) $(usrlibdir)/$(<F) $(LN_S) -f $(USRLIB_RELPATH)$(<F).$(LIB_VERSION) $(usrlibdir)/$(<F)
# FIXME: plugins are currently installed with .so suffix only # FIXME: plugins are installed to subdirs
install_lib_shared_plugin: $(LIB_SHARED) # and for compatibility links in libdir are created
$(INSTALL_PROGRAM) -D $< $(libdir)/$(<F) # when the code is fixed links could be removed.
install_dm_plugin: $(LIB_SHARED)
$(INSTALL_PROGRAM) -D $< $(libdir)/device-mapper/$(<F)
$(LN_S) -f device-mapper/$(<F) $(libdir)/$(<F)
$(LN_S) -f $(<F) $(libdir)/$(<F).$(LIB_VERSION)
install_lvm2_plugin: $(LIB_SHARED)
$(INSTALL_PROGRAM) -D $< $(libdir)/lvm2/$(<F)
$(LN_S) -f lvm2/$(<F) $(libdir)/$(<F)
$(LN_S) -f $(<F) $(libdir)/$(<F).$(LIB_VERSION)
endif endif
%.so: %.a %.so: %.a