DESTDIR is broken in 1.00.09
Hi,
Current testdir support is broken: try ./configure --bindir=/usr/bin --mandir=/usr/share/man etc and you will end up with make.tmpl like
# Setup directory variables
prefix = $(DESTDIR)/usrexec_prefix = $(DESTDIR)/usr
bindir = /usr/bin
includedir = /usr/include
libdir = /usr/lib
sbindir = /sbin
infodir = /usr/share/info
mandir = /usr/share/man
kerneldir =
interface = ioctl
interfacedir = $(top_srcdir)/lib/$(interface)
bindir, libdir and friends are substituted to ${prefix}/bin only when --bindir is not specified.
Attached patch fixes that properly.
Signature · 2 lines
Arkadiusz Miśkiewicz CS at FoE, Wroclaw University of Technology arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
dmsetup/Makefile.in +1 -1
@@ -28,7 +28,7 @@ -ldevmapper install: dmsetup - $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< $(sbindir)/$< + $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< $(DESTDIR)$(sbindir)/$< .PHONY: install
lib/Makefile.in +7 -7
@@ -30,29 +30,29 @@ install: install_@interface@ - $(LN_S) -f libdevmapper.so.$(LIB_VERSION) $(libdir)/libdevmapper.so + $(LN_S) -f libdevmapper.so.$(LIB_VERSION) $(DESTDIR)$(libdir)/libdevmapper.so $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 libdevmapper.h \ - $(includedir)/libdevmapper.h + $(DESTDIR)$(includedir)/libdevmapper.h install_static: install_@interface@_static - $(LN_S) -f libdevmapper.a.$(LIB_VERSION) $(libdir)/libdevmapper.a + $(LN_S) -f libdevmapper.a.$(LIB_VERSION) $(DESTDIR)$(libdir)/libdevmapper.a $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 444 libdevmapper.h \ - $(includedir)/libdevmapper.h + $(DESTDIR)$(includedir)/libdevmapper.h .PHONY: install install_@interface@ install_static install_@interface@_static install_fs: fs/libdevmapper.so $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/libdevmapper.so.$(LIB_VERSION) + $(DESTDIR)$(libdir)/libdevmapper.so.$(LIB_VERSION) install_ioctl: ioctl/libdevmapper.so $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/libdevmapper.so.$(LIB_VERSION) + $(DESTDIR)$(libdir)/libdevmapper.so.$(LIB_VERSION) install_ioctl_static: ioctl/libdevmapper.a $(INSTALL) -D -o $(OWNER) -g $(GROUP) -m 555 $(STRIP) $< \ - $(libdir)/libdevmapper.a.$(LIB_VERSION) + $(DESTDIR)$(libdir)/libdevmapper.a.$(LIB_VERSION) distclean_lib: $(RM) libdm-common.h
make.tmpl.in +2 -2
@@ -27,8 +27,8 @@ LD_DEPS += @LD_DEPS@ # Setup directory variables -prefix = $(DESTDIR)@prefix@ -exec_prefix = $(DESTDIR)@exec_prefix@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ bindir = @bindir@ includedir = @includedir@ libdir = @libdir@
man/Makefile.in +2 -2
@@ -25,7 +25,7 @@ @echo "*** Installing $(ALL_MANUALS) in $(MAN8DIR) ***" @for f in $(MANUALS); \ do \ - $(RM) $(MAN8DIR)/$$f; \ - @INSTALL@ -D -o $(OWNER) -g $(GROUP) -m 444 $$f $(MAN8DIR)/$$f; \ + $(RM) $(DESTDIR)$(MAN8DIR)/$$f; \ + @INSTALL@ -D -o $(OWNER) -g $(GROUP) -m 444 $$f $(DESTDIR)$(MAN8DIR)/$$f; \ done
Quoted 1 line · Arkadiusz Miskiewicz
bindir, libdir and friends are substituted to ${prefix}/bin only when --bindir is not specified.
Hmmm, I submitted a patch to fix this problem before this last release, and it was accepted (with modifications) but didn't appear in the release.
Quoted 2 lines · Kevin P. Fleming
Hmmm, I submitted a patch to fix this problem before this last release, and it was accepted (with modifications) but didn't appear in the release.
The problem is fixed in make.tmpl.in in the LVM2 release, but I haven't synced the updates to the build process across to the device-mapper tree yet. I'll do it soon.
Alasdair
Signature · 1 line
[email protected]
Quoted 3 lines · Alasdair G Kergon
The problem is fixed in make.tmpl.in in the LVM2 release, but I haven't synced the updates to the build process across to the device-mapper tree yet. I'll do it soon.
I've done this in CVS now; I'll create new tarballs.
Alasdair
Signature · 1 line
[email protected]