|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-09-30 06:58:36
On Friday 29 September 2006 21:35, Eric Niebler wrote:
> David Abrahams wrote:
> > "Eric Niebler" <eric_at_[hidden]> writes:
> >> So, test-suite is not a target, and explicit only works on targets.
> >> Fine.
>
> I take that back, I don't think that's fine. If "explicit" only works on
> targets, shouldn't it be an error to use it with something that isn't a
> target? With a useful error, like "blah-ext is not a target"?
>
> >> But what makes test-suite not a target? How can I tell based on
> >> the syntax of:
> >>
> >> test-suite blah : [ blarg.cpp ] ;
> >>
> >> that test-suite is not a target? Syntactically, it looks a lot like
> >> things which are targets, right?
> >
> > No, that looks like a rule invocation (a.k.a. function call). Whether
> > a rule invocation creates a target or not, and what that target is
> > called, is totally up to the implementation of the rule.
>
> Oh. So rules are like functions that modify global state (the "targets,"
> for example)? And the global state is implicit; that is, there is no
> explicitly declared variable that holds the targets. Or is there?
There is no. And if there were, it would mean you have to pass the name of
that variable to all rules that declare targets, which would hardly be
convenient.
> And I would need to look at the documentation for that rule to determine
> if it creates a target, right?
Yes. For example, the 'glob' rule does not create a target.
> FWIW, I can't find where the test-suite
> rule is documented. I didn't look hard; did I overlooked it?
I don't think it's documented:
https://zigzag.cs.msu.su:7813/boost.build/ticket/110
- Volodya
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