summaryrefslogtreecommitdiffstats
path: root/gears/site_scons/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gears/site_scons/utils.py')
-rw-r--r--gears/site_scons/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gears/site_scons/utils.py b/gears/site_scons/utils.py
new file mode 100644
index 0000000..4bd4f93
--- /dev/null
+++ b/gears/site_scons/utils.py
@@ -0,0 +1,9 @@
+# Copyright (c) 2008 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+def PatternRule(target, source, env):
+ """Apply env substitution to a target with $SOURCE included. Returns a list
+ containing the new target and source to pass to a builder."""
+ target_sub = env.subst(target, source=env.File(source))
+ return [target_sub, source]