bug-automake
[Top][All Lists]
Advanced

[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: Mon, 20 Dec 2004 16:26:18 +0300
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Stepan Kasal wrote:

It seems that as of versions 1.9.2 and 1.9.3 at least, automake does not set DESTDIR when it executes install-data-local and similar targets. if you do (as documentation suggests)

install-data-local:
            $(INSTALL_DATA) $(srcdir)/afile $(DESTDIR)/etc/afile

and run "make install DESTDIR=/new/root", all "standard" targets are installed inside /new/root, but "afile" is installed into real /etc/.


I'm not an automake expert, but I cannot imagine how automake could have
any influence here:
You wrote the rule to Makefile.am, automake has copied it to Makefile.in,
so it is in your Makefile.

I suspected that the DESTDIR variable somehow got destroyed before recursively running "make install-*-local" but I was wrong.

What version of make, and on which platform do you use?
(Or: perhaps you just made a typo in your Makefile.am?)

OK, sorry, I was wrong.
It is another thing that does not work as I expected, not DESTDIR thing. Actually, it happens that only "make distcheck" gets broken, not "make install DESTDIR=...".

Because "install-*-local" is a natural place to play with files that are *not* located under $prefix (exactly as example in the documentation suggests), you may not want to put $prefix-dependant paths there. On the other hand, "make distcheck" configures the package with custom $prefix, and installs into that prefix, *not* specifying "DESTDIR". So, if your *-local target deals with files that are not located under $prefix, "make distcheck" breaks.

Maybe it would be better if distcheck ./configured the package with default prefix, but installed it specilying "DESTDIR=$(distdir)/_inst"?
I don't know if it may break anyting else, though...

Regards
Eugene




reply via email to

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