Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions kmake/src/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,15 @@ export class Project {
for (let sub of this.subProjects) sub.searchFiles(undefined);
this.searchFiles(this.basedir);
for (let includeobject of this.includes) {
if (path.isAbsolute(includeobject.file) && includeobject.file.includes('**')) {
const starIndex = includeobject.file.indexOf('**');
if (path.isAbsolute(includeobject.file) && (includeobject.file.includes('**') || includeobject.file.includes('*'))) {
const starIndex = includeobject.file.indexOf('**') > -1 ? includeobject.file.indexOf('**') : includeobject.file.indexOf('*');
const endIndex = includeobject.file.substring(0, starIndex).replace(/\\/g, '/').lastIndexOf('/');
this.searchFiles(includeobject.file.substring(0, endIndex));
}
if(path.isAbsolute(includeobject.file) && (includeobject.file.includes('.h') || includeobject.file.includes('.c') || includeobject.file.includes('.cpp') || includeobject.file.includes('.cxx') || includeobject.file.includes('.cc'))){
const endIndex = includeobject.file.replace(/\\/g, '/').lastIndexOf('/');
this.searchFiles(includeobject.file.substring(0, endIndex));
}

if (includeobject.file.startsWith('../')) {
let start = '../';
Expand All @@ -529,7 +533,7 @@ export class Project {
let files = fs.readdirSync(current);
nextfile: for (let f in files) {
let file = path.join(current, files[f]);

let follow = true;
try {
if (fs.statSync(file).isDirectory()) {
Expand Down
8 changes: 6 additions & 2 deletions lib/kmake/Project.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading