diff --git a/ChangeLog b/ChangeLog index 3190bf7f5..b9a2bbb76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-05-14 Richard Frith-Macdonald + + * Tools/autogsdoc.m: Create output directories if necessary. + 2004-05-14 Richard Frith-Macdonald * Source/GSFormat.h: diff --git a/Tools/autogsdoc.m b/Tools/autogsdoc.m index 7b7b6eb96..ef7cb8ed8 100644 --- a/Tools/autogsdoc.m +++ b/Tools/autogsdoc.m @@ -831,6 +831,9 @@ main(int argc, char **argv, char **env) } } + mgr = [NSFileManager defaultManager]; + + verbose = [defs boolForKey: @"Verbose"]; warn = [defs boolForKey: @"Warn"]; ignoreDependencies = [defs boolForKey: @"IgnoreDependencies"]; @@ -865,6 +868,11 @@ main(int argc, char **argv, char **env) { documentationDirectory = @""; } + if ([documentationDirectory length] > 0 + && [mgr fileExistsAtPath: documentationDirectory] == NO) + { + [mgr createDirectoryAtPath: documentationDirectory attributes: nil]; + } proc = [NSProcessInfo processInfo]; if (proc == nil) @@ -935,8 +943,6 @@ main(int argc, char **argv, char **env) } } - mgr = [NSFileManager defaultManager]; - /* * 3) Load old project indexing information from the .igsdoc file if * present and determine when the indexing information was last @@ -2246,6 +2252,11 @@ main(int argc, char **argv, char **env) [depend appendFormat: @" \\\n\t%@", file]; } + file = [stamp stringByDeletingLastPathComponent]; + if ([file length]> 0 && [mgr fileExistsAtPath: file] == NO) + { + [mgr createDirectoryAtPath: file attributes: nil]; + } [depend writeToFile: stamp atomically: YES]; }