[Top][All Lists]

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

Re: [un]install-*-local/install-*-hook does not honor DESTDIR

From: Eugene Crosser
Subject: Re: [un]install-*-local/install-*-hook does not honor DESTDIR
Date: Wed, 26 Jan 2005 09:51:37 +0300
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)


I was almost ready to accept Alexandre's reasons, but recently I've run into another similar problem, where 'local' hooks where not involved. Allow me to argue some more for my proposal to use DESTDIR when running "make distcheck". I believe that such change would make autoconf more useful.

Alexandre Duret-Lutz wrote:

 Eugene> Because "install-*-local" is a natural place to play
 Eugene> with files that are *not* located under $prefix
 Eugene> (exactly as example in the documentation suggests), you
 Eugene> may not want to put $prefix-dependant paths there.

Actually I'd rather change the documentation and use another,
better illustration for install-*-local.  Using hard-coded
install-paths always seems an error to me.  (The actual example
in the doc would be better written as `sysconf_DATA = afile'.)

I thought that install*local are specially designed to cover such cases when "proper" directory structure does not fit. I imagine perfectly legal use of absolute paths, e.g., when you want to install a startup script into /etc/init.d/ & /etc/rcX.d/ or, say, a log rotation script into /etc/logrotate.d directory. These locations are system-wide and have no relation to your package's installation prefix.

Another case when absolute paths may be legitimately introduced is when your package is a "plugin module" for another package that is already installed on your system. For instance, you may be building a shared object that is going to be installed into location provided by *other* package (e.g. via <package>-config script or pkgconfig). This needs to be independent of locally specified installation prefix; and currently it breaks "make distcheck". If "make distcheck" used DESTDIR it would work fine.

 Eugene> On the other hand, "make distcheck" configures the
 Eugene> package with custom $prefix, and installs into that
 Eugene> prefix, *not* specifying "DESTDIR".  So, if your
 Eugene> *-local target deals with files that are not located
 Eugene> under $prefix, "make distcheck" breaks.

Yes.  If a user wants to install a package on his account, he
will use something like `./configure --prefix ~/usr'.  However
if `make install' tries to write to some hard-coded directory
elsewhere the account, it will fail.  So `make distcheck' should
fail too.

Again, I can see a perfectly legal case when system-wide --prefix is specified and then "make install DESTDIR=..." is run as *non-root*. It is building of a package for some OS distribution. A packager may want to run non-root for safety, and to be sure that nothing has been installed into a wrong location (outside DESTDIR).

There are several reasons that are, in my opinion, quite legitimate, to re-do "make distcheck" target in such a way that it uses DESTDIR on "make install" and "make uninstall" runs, instead of specifying custom --prefix on "./configure" run.

Thank you


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]