[Top][All Lists]

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

Re: [avr-libc-dev] Re: circ dep fix

From: Joerg Wunsch
Subject: Re: [avr-libc-dev] Re: circ dep fix
Date: Mon, 5 Aug 2002 22:08:11 +0200
User-agent: Mutt/1.2.5i

As Theodore Roth wrote:

> :) ../domake DESTDIR=/tmp install
> :)
> :) did work for me (domake passes all its arguments down to the make
> :) utility).
> Ah, this works because of the way make deals with env variable. Let's say
> you have a makefile fragment like this:

Sure, after seeing those empty DESTDIR=, I understood why it
happened. ;-)  It's only that i don't see the purpose for those
empty macros.  If the macros weren't there, the environmental
override would even work (for just DESTDIR only) without -e,
while all other Makefile macros that are explicitly set (like
CFLAGS, CC etc.) would not have a chance to accidentally get imported
from the environment.  (All environmental variables are implicitly
reflected in make macros, but Makefile definitions then get
precedence over those inherited from the environment.  Finally, make
command-line overrides get precedence over the Makefile definitions.)

However, i frankly don't care much, using make DESTDIR=/foo
(or the appropriate domake script) is sufficient for my purpose
as well.

> BTW: the do* scripts are not part of autoconf/automake. They are just
> convience scripts that Reinhard added.

Yep, but it's automake that adds the empty DESTDIR= to the generated
Makefile.in files.  The Makefile.am or configure.in stuff doesn't
talk about DESTDIR at all.

I couldn't seem to find any explanation of this feature in the
automake docs, although it's quite clear that automake is the

address@hidden 230% grep 'DESTDIR.*=' /usr/local/share/automake14/automake/*
/usr/local/share/automake14/automake/header-vars.am:DESTDIR =

So they do it on purpose, but don't document why they're doing it.

[My explanation of $DESTDIR.]

> Once again you've exposed my ignorance. ;-)

Well, not really.  I probably wouldn't know about this feature if it
weren't that FreeBSDs release compilation process uses it extensively:
it bootstraps a chroot environment using DESTDIR=/some/place, then
chroots to /some/place, and builds the entire operating system
release within this chroot'ed environment.  This largely decouples
the process of building the release from the hosting environment,
since the entire chroot'ed system recompiles itself there.  (IOW,
every idiot that has a local replica of the CVS repository available
can basically compile a FreeBSD release himself. :-)

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/

reply via email to

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