Support custom suffixes on Makefile outputs am: 174978cc58
am: 8c24aa647d
* commit '8c24aa647d17cd526798920f781d22bb419001d4':
Support custom suffixes on Makefile outputs
Change-Id: I7e06a5360b50a202a60a98f972c31d3477cb1454
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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"`
|
||||
|
Reference in New Issue
Block a user