diff --git a/src/blobs/build.ts b/src/blobs/build.ts index 478c927..4176a57 100644 --- a/src/blobs/build.ts +++ b/src/blobs/build.ts @@ -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: { diff --git a/src/build/make.ts b/src/build/make.ts index 10f7c47..abf8e36 100644 --- a/src/build/make.ts +++ b/src/build/make.ts @@ -131,7 +131,7 @@ include $(BUILD_PREBUILT)`) } function addContBlock(blocks: Array, variable: String, items: Array | undefined) { - if (items != undefined) { + if (items != undefined && items.length > 0) { blocks.push(`${variable} += \\ ${items.join(CONT_SEPARATOR)}`) } diff --git a/src/frontend/generate.ts b/src/frontend/generate.ts index 7c58cd5..a0f7578 100644 --- a/src/frontend/generate.ts +++ b/src/frontend/generate.ts @@ -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) }