blob: d33b7051af798587a7680d78625578ce34aa7a83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# 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]
def GetInputs(var, env):
"""Expands an env substitution variable and returns it as a list of
strings."""
return [str(v) for v in env.subst_list(var)[0]]
|