From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-06-16 03:26:53
I've just committed the support for the 'notfile' target, that I've previously
proposed. In short, it allows to write arbitrary command that might not create
any targets at all.
The original email describing the new rule is below. Comments are welcome.
Toon, this should help with your "run script after install" use case, please
let me know if it works.
I think it would be good to add a target that just runs some command, without
creating any files. When such target is built, the command is just run, and
no up-to-date checks are made for any files.
There are two use cases.
1. In my projects the system tests are run with some rather long command. I'd
like to just type "bjam system-tests" and run that command.
2. Recently, Cédric wanted to run some tool on source .dsp files. And there's
no way to tell what the tool does and what files it produces. The tool just
must be run.
I propose this interface:
notfile <name> : <action> : <sources>
: <requirements> ... all the regular paramenters ;
The <action> parameter can have two forms:
1. "some command" in which case the command is run verbatim
notfile say : "echo hi" ;
2. @name_of_the_rule, in which can the named rule/action will be invoked. For
notfile hello_valgrind : @valgrind : hello ;
The first will just execute the command. The second will invoke the 'valgrind'
tool on the source -- the 'hello' target.
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: 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