[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] [RFC][PATCH] proper DESTDIR handling for device-mapperand LVM2

Alasdair G Kergon wrote:

Thanks for the tidying: I'll work through this properly late next week. (Office moves today.) Quick comments: I'd prefer not to see DESTDIR in Makefiles though: only in the template, and some (I thought most?) people *do* want to pick up some include files etc. from their DESTDIR (they're not
installed on their main system, or the ones on their system are different
versions from the ones in DESTDIR which has the correct environment the
software uses when it runs): perhaps that should be split into a separate
configuration option (enabled by default)?

To keep DESTDIR only in the template, you'll have to replace the

bindir = @bindir@

lines (and similar) in make.tmpl with

bindir = $(DESTDIR)@bindir@

to avoid the problem of @bindir@ not including ${prefix}. Just don't bother putting $(DESTDIR) into prefix/exec_prefix at all, IMHO.

I can't speak to what everyone else does with DESTDIR, but most packaging systems point DESTDIR to an _empty_ subtree to do the install into, so they can package up all the resulting files. If someone wanted to build LVM2 on a system that had device-mapper _only_ installed into DESTDIR (i.e. /usr/lib did not contain libdevmapper.so, /usr/include did not contain libdevmapper.h, etc.) this would take a lot more work than what was already in the Makefiles, and even then it would tend to break because /usr/sbin/lvm would end up linked to


instead of


and so /usr/sbin/lvm wouldn't run properly once the DESTDIR directory was used as a real environment.

So just to be completely redundant <G>, I'll reiterate the way I've always seen DESTDIR used: it's used _only_ at "make install" time to redirect the installation to a different path than the package was compiled to run from.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]