tcbuilder 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tcbuild.js +8 -4
- package/package.json +1 -1
package/dist/tcbuild.js
CHANGED
|
@@ -183,7 +183,7 @@ function _groupFile(fileName, flags, options) {
|
|
|
183
183
|
existisFile.flags += ` ${flags}`;
|
|
184
184
|
if (options?.toBeRemoved)
|
|
185
185
|
existisFile.toBeRemoved.push(options.toBeRemoved);
|
|
186
|
-
if (options?.includeInFinalOutput)
|
|
186
|
+
if (options?.includeInFinalOutput !== undefined)
|
|
187
187
|
existisFile.includeInFinalOutput = options.includeInFinalOutput;
|
|
188
188
|
}
|
|
189
189
|
else {
|
|
@@ -195,7 +195,7 @@ function _groupFile(fileName, flags, options) {
|
|
|
195
195
|
};
|
|
196
196
|
if (options?.toBeRemoved)
|
|
197
197
|
currentGroup.files[file].toBeRemoved.push(options.toBeRemoved);
|
|
198
|
-
if (options?.includeInFinalOutput)
|
|
198
|
+
if (options?.includeInFinalOutput !== undefined)
|
|
199
199
|
currentGroup.files[file].includeInFinalOutput = options.includeInFinalOutput;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -237,13 +237,17 @@ process.once('beforeExit', async () => {
|
|
|
237
237
|
targets += `${out_name}${group.finalExeSuffix} `;
|
|
238
238
|
let recipe = '';
|
|
239
239
|
let objects = '';
|
|
240
|
+
let non_objects = '';
|
|
240
241
|
for (const fileName in group.files) {
|
|
241
242
|
if (!Object.hasOwn(group.files, fileName))
|
|
242
243
|
continue;
|
|
243
244
|
const file = group.files[fileName];
|
|
244
245
|
const fileLastExt = fileName.split('.').pop();
|
|
245
246
|
let obj_out = `${build_dir}/${fileName}.o`;
|
|
246
|
-
|
|
247
|
+
if (file.includeInFinalOutput)
|
|
248
|
+
objects += ` ${obj_out}`;
|
|
249
|
+
else
|
|
250
|
+
non_objects += ` ${obj_out}`;
|
|
247
251
|
let final_flags = `${ /* globalSrcFileFlags */''} ${file.flags ?? ''}`;
|
|
248
252
|
for (const ext of fileName.split('.').slice(1)) {
|
|
249
253
|
if (ext.length <= 0)
|
|
@@ -259,7 +263,7 @@ process.once('beforeExit', async () => {
|
|
|
259
263
|
if (group.finalFlagsToBeRemoved.length > 0)
|
|
260
264
|
for (const remove of group.finalFlagsToBeRemoved)
|
|
261
265
|
group_final_flags = group_final_flags.replaceAll(remove, '');
|
|
262
|
-
make_out += `OBJ_${name}=${objects}\n${out_name}${group.finalExeSuffix}:$(OBJ_${name})\n\t${group.finalExe} ${group_final_flags}\n${recipe}-include $(OBJ_${name}:=.d)\n`;
|
|
266
|
+
make_out += `OBJ_${name}=${objects}\n${out_name}${group.finalExeSuffix}:$(OBJ_${name}) ${non_objects}\n\t${group.finalExe} ${group_final_flags}\n${recipe}-include $(OBJ_${name}:=.d)\n`;
|
|
263
267
|
}
|
|
264
268
|
await fs.promises.writeFile('./Makefile', `all: ${targets}\n${make_out}`);
|
|
265
269
|
});
|