bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: PATCH: honour DESTDIR


From: Paul D. Smith
Subject: Re: PATCH: honour DESTDIR
Date: 07 May 2002 09:42:33 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

%% address@hidden (Miles Bader) writes:

  mb> address@hidden (Alfred M. Szmidt) writes:
  >> And most GNU software will become broken if you use `make prefix=...'
  >> as it can write some things that depend on `prefix', and if you change
  >> it to something that will be written into the binary.

  mb> No.

  mb> Packages must do all building that embeds `$prefix' in a normal `make',
  mb> so that a subsequent `make install prefix=...' will not modify any
  mb> embedded paths while installing.

  mb> This behavior is _required_ by the GNU standards, whereas DESTDIR is
  mb> optional.

Yes, but there's no chance to treat DESTDIR incorrectly, because it is
simply prepended to pathnames during the install process.

On the other hand, it can be tricky to get the prefix rules right,
especially in the presence of shared libraries.

Plus, in odd circumstances where targets have incorrect timestamps
(perhaps because of network filesystems, perhaps because of something
the user did accidentally or on purpose) sometimes the install target
will rebuild some things when you didn't expect it to.  That's just fine
with DESTDIR, but could be disastrous if you changed prefix.

Finally, DESTDIR support allows you to build and install in one step
rather than two--admittedly this is not a big deal normally, but on
sufficiently large projects it can make a little bit of a difference.

Although I agree that in a correctly constructed package using "make
DESTDIR=/foo install" and "make prefix=/foo/usr/local install" are
identical (assuming the original value of prefix is /usr/local), I find
DESTDIR preferable as it is safer and more reliable.


My $0.02.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

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