|
Boost-Build : |
From: Jurko Gospodnetiæ (jurko.gospodnetic_at_[hidden])
Date: 2008-01-24 04:52:47
Hi Alex wrote.
> My question is - how do I call the shell command for the "package" target?
Try using the 'make' rule to define a target with your stage target
listed as its source. Then write the shell command in the make target's
action.
Here's an example taken from the make_rule.py test:
#----------------------------------------
import feature ;
feature.feature test_feature : : free ;
import toolset ;
toolset.flags creator STRING : <test_feature> ;
actions creator
{
echo $(STRING) > $(<)
}
make foo.bar : : creator : <test_feature>12345678 ;
#----------------------------------------
It shows how to pass additional Boost Build 'flags' to the action as
a bonus, though you might not need that...
It does not specify any sources for the make target though... that
would be specified after the first ':' on the 'make' line.
You also most likely want to declare this package target explicit.
You can easily wrap this up inside your own 'package' rule that calls
the make rule but provides some specialized interface - more appropriate
to your domain. For example of that see the tools/package.jam script
which defines a package.install rule which actually just wraps several
stage rule calls.
Hope this helps.
Best regards,
Jurko Gospodnetiæ
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