mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Clean up shared-lib support in test/.
* test/Makefile.in (so_name): Use @DMDIR@. (.bin-dir-stamp): Create symlink only if @DMDIR@ is nonempty. (lvm-wrapper): Emit LD_LIBRARY_PATH setting only if @DMDIR@ is nonempty. Based on a patch from Jun'ichi Nomura. Author: Jim Meyering <jim@meyering.net>
This commit is contained in:
parent
09339e2b53
commit
9dba0bab82
@ -42,13 +42,13 @@ $(T): init.sh
|
||||
@echo "*** $@ ***"; '$(SHELL_PATH_SQ)' \
|
||||
$(TESTS_ENVIRONMENT) $@ $(GIT_TEST_OPTS)
|
||||
|
||||
dmdir = $(abs_top_srcdir)/../device-mapper
|
||||
so_name = $(dmdir)/lib/ioctl/libdevmapper.so.1.02
|
||||
so_name = @DMDIR@/lib/ioctl/libdevmapper.so.1.02
|
||||
|
||||
# Having to create this link is a huge kludge,
|
||||
# Having to create this symlink is an ugly kludge,
|
||||
# and a major argument for including device-mapper in lvm.
|
||||
.bin-dir-stamp: lvm-wrapper
|
||||
ln -fs libdevmapper.so $(so_name)
|
||||
test -n "@DMDIR@" \
|
||||
&& ln -fs libdevmapper.so $(so_name)
|
||||
rm -rf bin
|
||||
mkdir bin
|
||||
for i in lvm $$(cat $(top_srcdir)/tools/.commands); do \
|
||||
@ -59,7 +59,8 @@ so_name = $(dmdir)/lib/ioctl/libdevmapper.so.1.02
|
||||
lvm-wrapper: Makefile
|
||||
rm -f $@-t $@
|
||||
echo '#!/bin/sh' >> $@-t
|
||||
echo 'export LD_LIBRARY_PATH="$(dmdir)/lib/ioctl"' >> $@-t
|
||||
test -n "@DMDIR@" \
|
||||
&& echo 'export LD_LIBRARY_PATH="@DMDIR@/lib/ioctl"' >> $@-t
|
||||
echo 'cmd=$$(echo ./$$0|sed "s,.*/,,")' >> $@-t
|
||||
echo 'test "$$cmd" = lvm &&' >> $@-t
|
||||
echo 'exec "$(abs_top_builddir)/tools/lvm" "$$@"' >> $@-t
|
||||
|
Loading…
Reference in New Issue
Block a user