Boost logo

Boost-Build :

Subject: Re: [Boost-build] Named metatarget parameters
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-03-06 04:27:17


On Monday 01 March 2010 18:45:57 Matthew Chambers wrote:

> On 2/28/2010 4:14 AM, Vladimir Prus wrote:
> > I am thinking of introducing named parameters to metatarget rules along the lines
> > of the following:
> >
> > lib program_options
> > : parsers.cpp
> > [ requirements<link>static ]
> > [ usage-requirements<define>BOOST_ALL_NO_LIB=1 ]
> > [ default-build<variant>release ]
> > [ description "Does something about dashes on command line" ]
> > [ license "BSL 1.0" ]
> > ;
> >
> > I expect the current syntax to remain available forever, but make this
> > new one the officially documented. You might note the example uses some
> > attributes ('description', 'license') that are not even available now,
> > and in fact adding a pile of optional attributes is the primary goal
> > here.
> >
> > Internally, this will be implemented by introducing special classes
> > that are returned by rules like 'requirements' and specially processed
> > when encountered in the list of sources.
> >
> > Before I go and implement this, would anybody be willing to critizie
> > my experiments in DSL design?
> >
> Named parameters would be a welcome feature! As would additional
> optional parameters like you've listed here for description and license
> (presumably these would become accessible in a build help system).

The direct motivation is pkg-config support. But those can have many uses indeed.

> I
> think your proposal has a decent syntax, but I agree with Johan that
> sticking with the project rule syntax would be optimal. If that's not
> feasible to implement, I'm happy with what you proposed. Would
> conditionals work as well?

Which conditionals? Conditional requirements? Those should be unchaged.

Thanks,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk