summaryrefslogtreecommitdiff
path: root/tools/build/example/generate/gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build/example/generate/gen.py')
-rw-r--r--tools/build/example/generate/gen.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/build/example/generate/gen.py b/tools/build/example/generate/gen.py
new file mode 100644
index 0000000000..09ee15b43a
--- /dev/null
+++ b/tools/build/example/generate/gen.py
@@ -0,0 +1,16 @@
+
+from b2.build.virtual_target import NonScanningAction, FileTarget
+
+def generate_example(project, name, ps, sources):
+
+ result = []
+ for s in sources:
+
+ a = NonScanningAction([s], "common.copy", ps)
+
+ # Create a target to represent the action result. Uses the target name
+ # passed here via the 'name' parameter and the same type and project as
+ # the source.
+ result.append(FileTarget(name, s.type(), project, a))
+
+ return result