diff --git a/src/build/make.ts b/src/build/make.ts index f2860e9..3d61f04 100644 --- a/src/build/make.ts +++ b/src/build/make.ts @@ -236,6 +236,13 @@ PRODUCT_MANUFACTURER := ${mk.manufacturer}`) 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 if (build_id !== undefined) { diff --git a/src/commands/generate-prep.ts b/src/commands/generate-prep.ts index a70ab98..6b14415 100644 --- a/src/commands/generate-prep.ts +++ b/src/commands/generate-prep.ts @@ -127,6 +127,10 @@ export default class GeneratePrep extends Command { 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) }, config => config.device.name, diff --git a/src/config/device.ts b/src/config/device.ts index b649331..9c1ae17 100644 --- a/src/config/device.ts +++ b/src/config/device.ts @@ -38,6 +38,8 @@ export interface DeviceConfig { namespaces: string[] sepolicy_dirs: string[] product_makefile: string // required + // not included in makefile for state collection build (generate-prep) + extra_product_makefiles: string[] } generate: { @@ -99,6 +101,7 @@ const DEFAULT_CONFIG_BASE = { platform: { namespaces: [], sepolicy_dirs: [], + extra_product_makefiles: [], }, generate: { overrides: true,