- overwrite (rather than append) the output file if we have no separator
- avoid output if there is nothing to do
This commit is contained in:
parent
2743c81e77
commit
b631a813f8
|
@ -347,7 +347,7 @@ static void output_dependencies(void)
|
|||
}
|
||||
if (!file)
|
||||
{
|
||||
if (!(file = fopen( OutputFileName, "a" )))
|
||||
if (!(file = fopen( OutputFileName, Separator ? "a" : "w" )))
|
||||
{
|
||||
perror( OutputFileName );
|
||||
exit(1);
|
||||
|
@ -416,6 +416,6 @@ int main( int argc, char *argv[] )
|
|||
}
|
||||
for (pFile = firstInclude; pFile; pFile = pFile->next)
|
||||
parse_file( pFile, 0 );
|
||||
output_dependencies();
|
||||
if( firstSrc ) output_dependencies();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue