Fix a bug in makedep which will caused includes on the first line of the file like in skyraid.h to be ignored. [Couriersud]

This commit is contained in:
Couriersud 2011-01-18 23:05:21 +00:00
parent adce78fbe2
commit 7f400e7393

View File

@ -435,12 +435,16 @@ static file_entry *compute_dependencies(int srcrootlen, const astring *srcfile)
int scan = index;
dependency *dep;
int start;
int just_continue = 0;
/* first make sure we're not commented or quoted */
for (scan = index; scan > 2 && filedata[scan] != 13 && filedata[scan] != 10; scan--)
if ((filedata[scan] == '/' && filedata[scan - 1] == '/') || filedata[scan] == '"')
{
just_continue = 1;
break;
if (filedata[scan] != 13 && filedata[scan] != 10)
}
if (just_continue)
continue;
/* scan forward to find the quotes or bracket */