- Don't append to existing files.

svn path=/trunk/; revision=10546
This commit is contained in:
Filip Navara 2004-08-15 00:51:01 +00:00
parent 525f112e0c
commit e2635a47ed

View file

@ -600,6 +600,7 @@ static void output_dependencies(void)
FILE *file = NULL; FILE *file = NULL;
char buffer[1024]; char buffer[1024];
#if 0
if (Separator && ((file = fopen( OutputFileName, "r+" )))) if (Separator && ((file = fopen( OutputFileName, "r+" ))))
{ {
while (fgets( buffer, sizeof(buffer), file )) while (fgets( buffer, sizeof(buffer), file ))
@ -619,6 +620,13 @@ static void output_dependencies(void)
exit(1); exit(1);
} }
} }
#else
if (!(file = fopen( OutputFileName, "w" )))
{
perror( OutputFileName );
exit(1);
}
#endif
for( pFile = firstSrc; pFile; pFile = pFile->next) for( pFile = firstSrc; pFile; pFile = pFile->next)
{ {
column = 0; column = 0;