diff options
author | Colin Cross <ccross@android.com> | 2015-06-17 15:09:06 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-06-17 15:36:48 -0700 |
commit | 8f101b45fc876b63f2a556c5b19801dbc8ac5fdc (patch) | |
tree | 2be41986a7a55669b2a6632f84685c6a46e343a8 /genrule | |
parent | 1f8c52be73d31f3347bcf7f8fb29b49e87b3864e (diff) | |
download | build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.tar.gz build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.tar.bz2 build_soong-8f101b45fc876b63f2a556c5b19801dbc8ac5fdc.zip |
Allow common.Glob to be called by singletons
Make common.Glob take an interface that is the intersection of
blueprint.ModuleContext and blueprint.SingletonContext used by
Glob and GlobRule, allowing it to be called on either. Also
move ExpandSources and Glob into AndroidModuleContext.
Change-Id: I8d1a3160c5dd201033afdb37210e82d8065b137d
Diffstat (limited to 'genrule')
-rw-r--r-- | genrule/genrule.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go index 42ab047a..ea30e3d1 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -132,7 +132,7 @@ func GenSrcsFactory() (blueprint.Module, []interface{}) { properties := &genSrcsProperties{} tasks := func(ctx common.AndroidModuleContext) []generateTask { - srcFiles := common.ExpandSources(ctx, properties.Srcs) + srcFiles := ctx.ExpandSources(properties.Srcs) tasks := make([]generateTask, 0, len(srcFiles)) for _, in := range srcFiles { out := pathtools.ReplaceExtension(in, properties.Output_extension) @@ -159,7 +159,7 @@ func GenRuleFactory() (blueprint.Module, []interface{}) { tasks := func(ctx common.AndroidModuleContext) []generateTask { return []generateTask{ { - in: common.ExpandSources(ctx, properties.Srcs), + in: ctx.ExpandSources(properties.Srcs), out: filepath.Join(common.ModuleGenDir(ctx), properties.Out), }, } |