mirror of
https://github.com/boostorg/build.git
synced 2026-02-01 08:22:15 +00:00
36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
# Copyright 2007 Vladimir Prus
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
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 ;
|