- 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:
Dimitrie O. Paun 2000-12-05 03:57:35 +00:00 committed by Alexandre Julliard
parent 2743c81e77
commit b631a813f8
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}