• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2import "class" : new ;
3import common ;
4
5rule generate-example ( project name : property-set : sources * )
6{
7    local result ;
8    for local s in $(sources)
9    {
10        #local source-name = [ $(s).name ] ;
11        #local source-action = [ $(s).action ] ;
12        #local source-properties = [ $(source-action).properties ] ;
13
14        # Create a new action, that takes the source target and runs the
15        # 'common.copy' command on it.
16        local a = [ new non-scanning-action $(s) : common.copy : $(property-set)
17            ] ;
18
19        # Create a target to represent the action result. Uses the target name
20        # passed here via the 'name' parameter and the same type and project as
21        # the source.
22        result += [ new file-target $(name) : [ $(s).type ] : $(project) : $(a)
23            ] ;
24    }
25    return $(result) ;
26}