Subject: Re: how to deal with USE_INET6 and BUILD_DEFS?
To: None <>
From: Georg Schwarz <>
List: tech-pkg
Date: 03/07/2005 17:59:43
> BUILD_DEFS is a string containing definitions the package was built

The problem I see here is that USE_INET6 as such is not
a definition but rather a switch than can be either YES or NO.

> with.  having USE_INET6 in BUILD_DEFS while the package was built
> without IPv6 support is bogus and wrong.

It really depends on what BUILD_DEFS is supposed to be

a) a list of items whose values influence the way the package is built.
The values such auch are not included in BUILD_DEFS.
If XXX is in BUILD_DEFS this means that XXX's value influences in some
respect the way the package is built.


b) a list of items (options) that imply a certain settings with which the
package was built.

What you're suggesting is b).

Judging from what I have seen in several packages (just do a grep for
USE_INET6 in the Makefiles; it is very often unconditionally added to
BUILD_DEFS) I had assumed a).

Could we please clarify which it is? The difference manifents itself in
the way switches like USE_INET6 (which can be either YES or NO) are or are
not included.

> it's exactly the other way around, net/zebra/Makefile is broken with
> this regard.

if b) applies, this is indeed the case and probably holds for quite some
other packages as well.

> > Now I would agree that things are different with options such as inet6
> > (see above), but to my knowledge these are not listed in BUILD_DEFS.
> they are, indeed.  from
>  .if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
>  BUILD_DEFS+=            PKG_OPTIONS
>  .endif

Thanks for clarifying. I had not checked that. Unfortunately, as explained
earlier, with options like inet6 etc., things are pretty clear, so this
does not help for the above question.

> so, to summarise, both chat/eggdrop and net/zebra should be converted to
> PKG_OPTIONS framework and inet6 option should be set only when USE_INET6
> for the given platform is enabled.

That's right, but it does not touch upon the above question.


Georg Schwarz  +49 178 8545053