public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] destdir vs prefix
@ 2001-07-24 17:40 jano
  2001-07-24 19:12 ` tadpol
  0 siblings, 1 reply; 2+ messages in thread
From: jano @ 2001-07-24 17:40 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]

Hi,

i've had this explained to me a few times already, but for some reason,
I'm still having problems grasping the idea.

program is typical autoconf tarball.. ./configure, make, make install.

So when doing the "try make install" command within an .ebuild file,
how do you know whether to use DESTDIR or PREFIX, or both?  I check out
the makefile for this particular program, which has the files depend on
${prefix} (e.g. mandir=${prefix}/man), and a sole line with "DESTDIR =  "

This particular program installs the biaries, docs, etc fine either
way.  If I do:
try make PREFIX=${D} install
however, when reading the /var/db/pkg/blah/CONTENTS file, i see only
those files which I explicitly do a dodoc, dobin, doman, etc.  So an
unmerge/uninstall will not remove the whole program as it should.  I
tried to change it to PREFIX=${D}/usr as I've seen in some ebuilds, no
worky worky.  But when I do:
try make DESTDIR=${D} install
everything shows up the right way, including CONTENTS and stuff.

I'm rendered confused.  Why does it work this way?

jano



[-- Attachment #2: Type: , Size: 2 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] destdir vs prefix
  2001-07-24 17:40 [gentoo-dev] destdir vs prefix jano
@ 2001-07-24 19:12 ` tadpol
  0 siblings, 0 replies; 2+ messages in thread
From: tadpol @ 2001-07-24 19:12 UTC (permalink / raw
  To: gentoo-dev

On Tue, Jul 24, 2001 at 04:44:47PM -0700, jano wrote:
> i've had this explained to me a few times already, but for some reason,
> I'm still having problems grasping the idea.
> 
> program is typical autoconf tarball.. ./configure, make, make install.
> 
> So when doing the "try make install" command within an .ebuild file,
> how do you know whether to use DESTDIR or PREFIX, or both?  I check out
> the makefile for this particular program, which has the files depend on
> ${prefix} (e.g. mandir=${prefix}/man), and a sole line with "DESTDIR =  "
> 
> This particular program installs the biaries, docs, etc fine either
> way.  If I do:
> try make PREFIX=${D} install

probably should have been:  try make prefix=${D} install
case is very important.

> however, when reading the /var/db/pkg/blah/CONTENTS file, i see only
> those files which I explicitly do a dodoc, dobin, doman, etc.  So an
> unmerge/uninstall will not remove the whole program as it should.  I
> tried to change it to PREFIX=${D}/usr as I've seen in some ebuilds, no
> worky worky.  But when I do:
> try make DESTDIR=${D} install
> everything shows up the right way, including CONTENTS and stuff.
> 
> I'm rendered confused.  Why does it work this way?

why not? ^_^

when you look in a Make file to see if you should use prefix or DESTDIR,
you really need to look at the install rule.  (Search for 'install:')
Following that should be a list of commands that are executed.  You should
be able to tell from that, though sometimes you have to look and see how
various variables are defined.  (It would hurt to have a basic
understanding of how make works.  (hmmm i see no makefile howto. that
sucks))


You need to use which ever works.  Which works? Depends on the makefile.
Since there is not any standard way to doing makefiles and install rules,
There isn't any concrete answer.  Sorry.  (Look on the bright side,
atleast one worked for you.  I've a couple of ebuilds I had to patch the
makefile so it would install correctly.)


Hope I helped thin the confusion, and not added to it.
-- 
Michael Tilstra                       tadpol@tadpol.org
My employer thinks my opinions are crap.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-25  1:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-24 17:40 [gentoo-dev] destdir vs prefix jano
2001-07-24 19:12 ` tadpol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox