overwriting NOT_FOR_ARCHS via /etc/make.conf has no effect

Mel fbsd.questions at rachie.is-a-geek.net
Mon Jan 26 10:00:18 PST 2009


On Monday 26 January 2009 05:06:48 Polytropon wrote:
> On Mon, 26 Jan 2009 12:55:29 +0000, Anton Shterenlikht <mexas at bristol.ac.uk> 
wrote:
> > I'm trying to overwrite a Makefile variable via /etc/make.conf
> > It doesn't seem to work:
>
> This behaviour is correct. The local makefiles have precedence
> before the /etc/make.conf settings.

They don't, even though it seems so. The Makefile is *read* 
after /etc/make.conf. The Makefile sets this variable unconditionally, 
therefore cannot be overridden by anything that is read before the Makefile.
If the Makefile defined it like so:
NOT_FOR_ARCHS?=alpha ia64

then /etc/make.conf would work, since the variable is defined at the time the 
Makefile is read.

>
> > What am I doing wrong?
>
> You could modify the port's Makefile itself, or create Makefile.local
> in the port's dicrectory with your specific settings, but I don't
> now if this mechanism is still supported.

It is and since Makefile.local is read *after* the Makefile, you can override 
the variable there.

-- 
Mel

Problem with today's modular software: they start with the modules
    and never get to the software part.


More information about the freebsd-questions mailing list