File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,18 @@ export class BobProject {
1515 let list : DirectoryTargets = { } ;
1616
1717 for ( let target of targets . getTargets ( ) ) {
18+ let dirname : string | undefined ;
1819 if ( target . relativePath ) {
19- const dirname = path . dirname ( target . relativePath ) ;
20+ dirname = path . dirname ( target . relativePath ) ;
21+ } else if ( target . type === `PGM` ) {
22+ // If there is no relative path, this might mean it's a multimodule program
23+ const possibleModule = targets . getTarget ( { systemName : target . systemName , type : `MODULE` } ) ;
24+ if ( possibleModule ) {
25+ dirname = path . dirname ( possibleModule . relativePath ) ;
26+ }
27+ }
28+
29+ if ( dirname ) {
2030 if ( list [ dirname ] === undefined ) list [ dirname ] = [ ] ;
2131
2232 list [ dirname ] . push ( target ) ;
@@ -85,7 +95,7 @@ class RulesFile {
8595
8696 const existingLine = this . parsed . find ( r => r . target === objName && r . isUserWritten !== true ) ;
8797
88- const lineContent = `${ path . relative ( this . subdir , target . relativePath ) } ${ target . headers ? target . headers . join ( ` ` ) + ` ` : `` } ${ target . deps . filter ( d => d . reference !== true ) . map ( d => `${ d . systemName } .${ d . type } ` ) . join ( ` ` ) } ` . trimEnd ( ) ;
98+ const lineContent = `${ target . relativePath ? path . relative ( this . subdir , target . relativePath ) + ' ' : `` } ${ target . headers ? target . headers . join ( ` ` ) + ` ` : `` } ${ target . deps . filter ( d => d . reference !== true ) . map ( d => `${ d . systemName } .${ d . type } ` ) . join ( ` ` ) } ` . trimEnd ( ) ;
8999
90100 if ( existingLine ) {
91101 existingLine . ogLine = `${ objName } : ${ lineContent } ` ;
You can’t perform that action at this time.
0 commit comments