[CFT+BRAINSTORM] One USE_ to rule them all

Pietro Cerutti gahr at FreeBSD.org
Tue Feb 5 11:15:43 UTC 2013


On 2013-Feb-04, 19:19, Baptiste Daroussin wrote:
> Hi,
> 
> I have some improvements to the ports tree to propose, and I'm looking for
> testers/opinions
> 
> First let me explain:
> 
> I want to introduce a new USE_FEATURES macro into the ports tree
> 
> The goal of this macros is to be able to standardize how we call all the USE_*
> things as well as creating some "load on demand" code for a corresponding
> feature.
> 
> What I expect in long term is to get a more readable bsd.port.mk & friends,
> meaning easier to maintain
> 
> I except some performance improvements given that make will have to parse less
> things.
> 
> I also expect less complexity if bsd.*.mk code.
> 
> What will have is all/most of the code corresponding to a USE_SOMETHING right
> now will endup in a Mk/features/something.mk which will be loaded only if the
> ports defines:
> USE_FEATURES=	something
> 
> the loading is done at the very early stage of bsd.port.post.mk to allow one to
> load modify USE_FEATURES depending on some options etc.
> 
> each features/*.mk is itself protected by a variable to avoid multi loading of
> the same file
> 
> if a feature depends on another one the feature itself just have to ".include"
> the other one.

Very nice idea, I'm looking forward to taking advantage of it!

-- 
Pietro Cerutti
The FreeBSD Project
gahr at FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130205/43a286ab/attachment.sig>


More information about the freebsd-ports mailing list