Gentoo Archives: gentoo-dev

From: tadpol@××××××.org
To: gentoo-dev@××××××××××.org
Subject: Re: [gentoo-dev] destdir vs prefix
Date: Tue, 24 Jul 2001 19:11:58
Message-Id: 20010724201132.B727@tadpol.org
In Reply to: [gentoo-dev] destdir vs prefix by jano
1 On Tue, Jul 24, 2001 at 04:44:47PM -0700, jano wrote:
2 > i've had this explained to me a few times already, but for some reason,
3 > I'm still having problems grasping the idea.
4 >
5 > program is typical autoconf tarball.. ./configure, make, make install.
6 >
7 > So when doing the "try make install" command within an .ebuild file,
8 > how do you know whether to use DESTDIR or PREFIX, or both? I check out
9 > the makefile for this particular program, which has the files depend on
10 > ${prefix} (e.g. mandir=${prefix}/man), and a sole line with "DESTDIR = "
11 >
12 > This particular program installs the biaries, docs, etc fine either
13 > way. If I do:
14 > try make PREFIX=${D} install
15
16 probably should have been: try make prefix=${D} install
17 case is very important.
18
19 > however, when reading the /var/db/pkg/blah/CONTENTS file, i see only
20 > those files which I explicitly do a dodoc, dobin, doman, etc. So an
21 > unmerge/uninstall will not remove the whole program as it should. I
22 > tried to change it to PREFIX=${D}/usr as I've seen in some ebuilds, no
23 > worky worky. But when I do:
24 > try make DESTDIR=${D} install
25 > everything shows up the right way, including CONTENTS and stuff.
26 >
27 > I'm rendered confused. Why does it work this way?
28
29 why not? ^_^
30
31 when you look in a Make file to see if you should use prefix or DESTDIR,
32 you really need to look at the install rule. (Search for 'install:')
33 Following that should be a list of commands that are executed. You should
34 be able to tell from that, though sometimes you have to look and see how
35 various variables are defined. (It would hurt to have a basic
36 understanding of how make works. (hmmm i see no makefile howto. that
37 sucks))
38
39
40 You need to use which ever works. Which works? Depends on the makefile.
41 Since there is not any standard way to doing makefiles and install rules,
42 There isn't any concrete answer. Sorry. (Look on the bright side,
43 atleast one worked for you. I've a couple of ebuilds I had to patch the
44 makefile so it would install correctly.)
45
46
47 Hope I helped thin the confusion, and not added to it.
48 --
49 Michael Tilstra tadpol@××××××.org
50 My employer thinks my opinions are crap.