|
Boost-Build : |
Subject: Re: [Boost-build] [Build] Extender Manual, Generators, Actions
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-04-22 22:52:20
AMDG
Brian Davis wrote:
>> 4. If the shell command needs to invoke a filter program handling
>>
>>> stdin and stdout pipes rather than a typical command-line program that
>>> takes file names as arguments, how should such a filter action be
>>> defined?
>>>
>>>
>>>
> I have never done this, but you may find what you are looking for in:
>
> boost_1_38_0/tools/build/v2/tools/testing.jam
>
> see rule:
>
> # Runs executable 'sources' and stores stdout in file 'target'. Unless
> # --preserve-test-targets command line option has been specified, removes
> the
> # executable. The 'target-to-remove' parameter controls what should be
> removed:
> # - if 'none', does not remove anything, ever
> # - if empty, removes 'source'
> # - if non-empty and not 'none', contains a list of sources to remove.
> #
> rule capture-output ( target : source : properties * : targets-to-remove * )
> ...
> ...
>
>
> It looks as though you would need to create a rule not an action (though
> this may be possible) to capture stdio or stdin. I would hope others that
> know more than I would weigh in on this. I am unsure if this can be done in
> a action, but I have *limited* knowledge.
>
This isn't quite right. An action is a group of commands to be executed
by the shell. A rule is jam code. The rule for testing.capture-output
sets up variables needed by the action.
In Christ,
Steven Watanabe
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