Skip to content

Commit 7513af0

Browse files
committed
Update CLI options for granular makefiles
Signed-off-by: worksofliam <[email protected]>
1 parent 8a3b244 commit 7513af0

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

cli/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export let cliSettings = {
1010
autoRename: false,
1111
lookupFiles: undefined as string[]|undefined,
1212
userBranch: ``,
13-
makefileIsPartial: false,
13+
makefileWithChildren: true,
1414
makefileWithParents: false,
1515
makefileWithParentsChildren: false,
1616
assumeSourcesArePrograms: false,

cli/src/index.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ async function main() {
6464

6565
case '-nc':
6666
case '--no-children':
67-
warningOut(`--no-children is deprecated and is default when doing partial builds.`);
68-
break;
69-
70-
case `-ip`:
71-
case `--is-partial`:
72-
cliSettings.makefileIsPartial = true;
67+
cliSettings.makefileWithChildren = false;
7368
break;
7469

7570
case `-wp`:
@@ -142,12 +137,16 @@ async function main() {
142137
console.log(``);
143138
console.log(`Options specific to '-bf make':`);
144139
console.log(``);
145-
console.log(`\t-ip`);
146-
console.log(`\t--is-partial\tWill only generate targets that are needed for`);
147-
console.log(`\t\t\tthe objects that are being built.`);
148-
console.log(``);
149140
console.log(`\t-wp`);
150-
console.log(`\t--with-parents\tUsed with '-bf make' and will add parents of`);
141+
console.log(`\t--with-parents\tWill add parents of`);
142+
console.log(`\t\t\tobjects being partially built to the makefile.`);
143+
console.log(``);
144+
console.log(`\t-wpc`);
145+
console.log(`\t--with-parents-children\tWill add children of parents`);
146+
console.log(`\t\t\t\tto makefile.`);
147+
console.log(``);
148+
console.log(`\t-nc`);
149+
console.log(`\t--no-children\tWill not add children of`);
151150
console.log(`\t\t\tobjects being partially built to the makefile.`);
152151
console.log(``);
153152
process.exit(0);
@@ -251,11 +250,13 @@ async function main() {
251250

252251
await makeProj.setupSettings();
253252

254-
makeProj.setPartialOptions({
255-
partial: cliSettings.makefileIsPartial,
256-
parents: cliSettings.makefileWithParents,
257-
parentsChildren: cliSettings.makefileWithParentsChildren
258-
})
253+
if (cliSettings.lookupFiles) {
254+
makeProj.setPartialOptions({
255+
withChildren: cliSettings.makefileWithChildren,
256+
parents: cliSettings.makefileWithParents,
257+
parentsChildren: cliSettings.makefileWithParentsChildren
258+
});
259+
}
259260

260261
let specificObjects: ILEObject[] | undefined = cliSettings.lookupFiles ? cliSettings.lookupFiles.map(f => targets.getResolvedObject(path.join(cwd, f))).filter(o => o) : undefined;
261262
writeFileSync(path.join(cwd, `makefile`), makeProj.getMakefile(specificObjects).join(`\n`));

0 commit comments

Comments
 (0)