|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-09-14 05:11:43
Hi Zhon,
sorry for later reply.
> Thank you for your help and this wonderful tool.
>
> Vladimir Prus wrote:
> > make test-runner.cpp : test-file.h : make-test-runner ;
> > actions make-test-runner
> > {
> > perl make-test-runner -output $(<)
> > }
>
> I have a couple of questions:
>
> 1) For me "perl make-test-runner -output $(<)" is failing silently with
> $(<). If I replace it with bin/msvc/debug/test-runner.cpp it is
> working. How do debug this command so I can see the value of $(<)?
Use "bjam -n". It will print commands instead of executing them.
> 2) I ended up replacing "actions" with "rule" because I got the error:
> kernel/module.jam:66 in module.call-in rule make-test-runner unknown in
> module class.... What does this error mean and how do I debug this?
Ah, sorry, the working code would be:
make test-runner.cpp : test-file.h : $(__name__).make-test-runner ;
actions make-test-runner
{
perl make-test-runner -output $(<)
}
The __name__ is the name of current module, and is used to fully-qualify the
rule.
But if you get the current version from CVS, or nightly build from
http://boost.org/boost-build2, you'll be able to use my original code
unmodified, and find an example of usage in example/make.
I've just removed the requirements to use fully-qualified name.
> > Will putting this in top-level Jamfile work for you:
> >
> > import testing ;
> > unit-test runner : runner.cpp dir1/testedfile.cpp
> > dir2/testedfile2.cpp ;
>
> This could work...it is what I am currently doing with my makefile. On
> the other hand, I would like to have many smaller test-runner exe to
> speed up the test, code, refactor cycle. This is part of the reason I
> am migrating to BBv2.
Then, what about
unit-test runner1 : dir1/testedfile.cpp ;
unit-test runner2 : dir2/testedfile2.cpp ;
and so on?
- Volodya
-- 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