From b631a813f8630eddb43b826a8e6b79c8bd432ca9 Mon Sep 17 00:00:00 2001 From: "Dimitrie O. Paun" Date: Tue, 5 Dec 2000 03:57:35 +0000 Subject: [PATCH] - overwrite (rather than append) the output file if we have no separator - avoid output if there is nothing to do --- tools/makedep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index ac26cfa5cd0..97d25416efe 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -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; }