[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PATCH: honour DESTDIR
From: |
Hans-Bernhard Broeker |
Subject: |
Re: PATCH: honour DESTDIR |
Date: |
7 May 2002 12:10:26 GMT |
Alfred M. Szmidt <address@hidden> wrote:
> * Miles Bader writes:
>> "Federico G. Schwindt" <address@hidden> writes:
>>> Ok, this seemed pretty clear, and it's in your standards, but I want
>>> this to be able to change final destinations by seting DESTDIR, useful for
>>> cross-compiling by instance or to test snapshots in a pseudo real-world
>>> installation.
>> With most GNU software it's usually pretty easy to do this anyway, by
>> installing in a separate pass (from building), with `make prefix=...'.
> 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.
That's not really true. At least not for "most" GNU software. It's a
violation of GNU standards, AFAIK, to create any files from scratch in
a "make install" run after a (successful) "make". So no change to
prefix only done for the "make install" run is allowed to affect the
_contents_ of the files actually installed. Only their positions are
supposed to be affected.
> DESTDIR doesn't do this.
AFAICS, it quite certainly does. If DESTDIR is set, it installs files
in a different place than 'make' believed them to be. This will break
any hard-coded paths exactly as much or as little as 'make install
prefix=...' would.
The only real difference between DESTDIR and 'make install prefix=...'
I can see is that using DESTDIR you don't have to know the value of
$(prefix) as determined at ./configure time. Other than that,
./configure prefix=/bar
make
make install DESTDIR=/foo
is exactly equivalent to
./configure prefix=/bar
make
make install prefix=/foo/bar
which works nicely with almost every autoconf-governed package I've
tried in a long while. I'm using the "stow" program to maintain may
/usr/local tree, which relies on this. So I would have noticed if the
majority of program failed to get this right.
--
Hans-Bernhard Broeker (address@hidden)
Even if all the snow were burnt, ashes would remain.
- PATCH: honour DESTDIR, Nick Clifton, 2002/05/05
- Re: PATCH: honour DESTDIR, Federico G. Schwindt, 2002/05/06
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/06
- Re: PATCH: honour DESTDIR, Alfred M. Szmidt, 2002/05/07
- Re: PATCH: honour DESTDIR,
Hans-Bernhard Broeker <=
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/07
- Re: PATCH: honour DESTDIR, Paul D. Smith, 2002/05/07
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/07
- Re: PATCH: honour DESTDIR, Tom Tromey, 2002/05/07
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/07
- Re: PATCH: honour DESTDIR, Tom Tromey, 2002/05/07
- Re: PATCH: honour DESTDIR, Paul D. Smith, 2002/05/07
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/07
- Re: PATCH: honour DESTDIR, Tom Tromey, 2002/05/08
- Re: PATCH: honour DESTDIR, Miles Bader, 2002/05/08