2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.

[SVN r36616]
This commit is contained in:
nobody
2007-01-06 15:20:37 +00:00
3 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import common ;
import "class" : new ;
rule generate-example ( project name : property-set : sources * )
{
local result ;
for local s in $(sources)
{
#local ea = [ $(s).action ] ;
#local ep = [ $(ea).properties ] ;
# Create a new action, that takes the source target
# and runs 'common.copy' comamnd on it.
local a = [
new non-scanning-action $(s) : common.copy : $(property-set) ] ;
local source-name = [ $(s).name ] ;
# Create the target to represent the result of the action.
# The target has the name that was specified in Jamfile
# and passed here via the 'name' parameter,
# and the same type and project as the source.
result += [ new file-target $(name)
: [ $(s).type ]
: $(project)
: $(a) ] ;
}
return $(result) ;
}
generate a2 : a.cpp : <generating-rule>@generate-example ;

View File

@@ -0,0 +1,12 @@
This example shows the 'generate' rule, that
allows you to construct target using any arbitrary
set of transformation and commands.
The rule is similar to 'make' and 'notfile', but
unlike those, you can operate in terms of
Boost.Build 'virtual targets', which is more
flexible.
Please consult the docs for more explanations.

View File

@@ -0,0 +1,4 @@
int main()
{
}