build: Reduce empty blocks and files
This commit is contained in:
parent
a1df9e718f
commit
9d71cfc36e
3 changed files with 8 additions and 4 deletions
|
@ -117,7 +117,9 @@ export async function generateBuild(
|
|||
}
|
||||
|
||||
let buildPackages = Array.from(namedModules.keys())
|
||||
buildPackages.push('device_symlinks')
|
||||
if (symlinks.length > 0) {
|
||||
buildPackages.push('device_symlinks')
|
||||
}
|
||||
|
||||
return {
|
||||
rootBlueprint: {
|
||||
|
|
|
@ -131,7 +131,7 @@ include $(BUILD_PREBUILT)`)
|
|||
}
|
||||
|
||||
function addContBlock(blocks: Array<string>, variable: String, items: Array<string> | undefined) {
|
||||
if (items != undefined) {
|
||||
if (items != undefined && items.length > 0) {
|
||||
blocks.push(`${variable} += \\
|
||||
${items.join(CONT_SEPARATOR)}`)
|
||||
}
|
||||
|
|
|
@ -322,8 +322,10 @@ export async function generateBuildFiles(
|
|||
}
|
||||
|
||||
// Dump list
|
||||
let fileList = serializeBlobList(entries)
|
||||
await fs.writeFile(`${dirs.out}/proprietary-files.txt`, fileList + '\n')
|
||||
if (entries.length > 0) {
|
||||
let fileList = serializeBlobList(entries)
|
||||
await fs.writeFile(`${dirs.out}/proprietary-files.txt`, fileList + '\n')
|
||||
}
|
||||
|
||||
await writeBuildFiles(build, dirs)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue