gen.jam 845 B

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