Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-04-11 08:31:35

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

For example

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 ;

actions valgrind
valgrind $(>)

The first will just execute the command. The second will invoke the 'valgrind'
tool on the source -- the 'hello' target.

The implementation is ready -- it actually took me less time to code than
writing this message ;-) Any comments?

Vladimir Prus
Boost.Build V2:

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at