support including extra makefiles into product makefile
This commit is contained in:
parent
35d14a7a2d
commit
514b71d258
3 changed files with 14 additions and 0 deletions
|
@ -236,6 +236,13 @@ PRODUCT_MANUFACTURER := ${mk.manufacturer}`)
|
||||||
blocks.push(`PRODUCT_ENFORCE_RRO_TARGETS := ${mk.enforceRros}`)
|
blocks.push(`PRODUCT_ENFORCE_RRO_TARGETS := ${mk.enforceRros}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let extraMakefiles = config?.platform?.extra_product_makefiles
|
||||||
|
if (extraMakefiles !== undefined && extraMakefiles.length > 0) {
|
||||||
|
for (let mk of extraMakefiles) {
|
||||||
|
blocks.push(`include ${mk}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let build_id = config?.device?.build_id
|
let build_id = config?.device?.build_id
|
||||||
|
|
||||||
if (build_id !== undefined) {
|
if (build_id !== undefined) {
|
||||||
|
|
|
@ -127,6 +127,10 @@ export default class GeneratePrep extends Command {
|
||||||
buildId = flags.buildId
|
buildId = flags.buildId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// these makefiles are expected to reference proprietary files that are
|
||||||
|
// inaccessible during state collection build
|
||||||
|
config.platform.extra_product_makefiles = []
|
||||||
|
|
||||||
await doDevice(config, stockSrc, buildId, flags.skipCopy, flags.useTemp)
|
await doDevice(config, stockSrc, buildId, flags.skipCopy, flags.useTemp)
|
||||||
},
|
},
|
||||||
config => config.device.name,
|
config => config.device.name,
|
||||||
|
|
|
@ -38,6 +38,8 @@ export interface DeviceConfig {
|
||||||
namespaces: string[]
|
namespaces: string[]
|
||||||
sepolicy_dirs: string[]
|
sepolicy_dirs: string[]
|
||||||
product_makefile: string // required
|
product_makefile: string // required
|
||||||
|
// not included in makefile for state collection build (generate-prep)
|
||||||
|
extra_product_makefiles: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
generate: {
|
generate: {
|
||||||
|
@ -99,6 +101,7 @@ const DEFAULT_CONFIG_BASE = {
|
||||||
platform: {
|
platform: {
|
||||||
namespaces: [],
|
namespaces: [],
|
||||||
sepolicy_dirs: [],
|
sepolicy_dirs: [],
|
||||||
|
extra_product_makefiles: [],
|
||||||
},
|
},
|
||||||
generate: {
|
generate: {
|
||||||
overrides: true,
|
overrides: true,
|
||||||
|
|
Loading…
Reference in a new issue