Support custom suffixes on Makefile outputs

am: 174978cc58

* commit '174978cc5834844517fc58f396561f2b24f3a169':
  Support custom suffixes on Makefile outputs

Change-Id: I605bab05736bd44c988cb9fa752ca0d78327db3d
This commit is contained in:
Dan Willemsen
2016-05-12 20:44:06 +00:00
committed by android-build-merger
2 changed files with 9 additions and 3 deletions

View File

@@ -26,6 +26,7 @@ import (
"android/soong"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
)
func init() {
@@ -54,11 +55,13 @@ func AndroidMkSingleton() blueprint.Singleton {
type androidMkSingleton struct{}
func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
if !ctx.Config().(Config).EmbeddedInMake() {
config := ctx.Config().(Config)
if !config.EmbeddedInMake() {
return
}
ctx.SetNinjaBuildDir(pctx, filepath.Join(ctx.Config().(Config).buildDir, ".."))
ctx.SetNinjaBuildDir(pctx, filepath.Join(config.buildDir, ".."))
var androidMkModulesList []AndroidModule
@@ -70,7 +73,7 @@ func (c *androidMkSingleton) GenerateBuildActions(ctx blueprint.SingletonContext
sort.Sort(AndroidModulesByName{androidMkModulesList, ctx})
transMk := PathForOutput(ctx, "Android.mk")
transMk := PathForOutput(ctx, "Android"+proptools.String(config.ProductVariables.Make_suffix)+".mk")
if ctx.Failed() {
return
}

View File

@@ -52,6 +52,9 @@ type variableProperties struct {
var zeroProductVariables variableProperties
type productVariables struct {
// Suffix to add to generated Makefiles
Make_suffix *string `json:",omitempty"`
Platform_sdk_version *int `json:",omitempty"`
DeviceName *string `json:",omitempty"`