Changes for index.html output

This commit is contained in:
rfm 2024-10-21 20:55:21 +01:00
parent bd6c52e8d4
commit f162e0f97e
4 changed files with 25 additions and 6 deletions

View file

@ -244,7 +244,8 @@ GCObject.h \
# directory.
#
Base_AGSDOC_FLAGS = \
-MakeFrames YES \
-MakeFrames NO \
-IndexFile Base \
-DocumentationDirectory ../Documentation/Base \
-HeaderDirectory ../Headers/Foundation \
-Declared Foundation \
@ -259,7 +260,8 @@ Base_AGSDOC_FLAGS = \
}' -Up Base
BaseAdditions_AGSDOC_FLAGS = \
-MakeFrames YES \
-MakeFrames NO \
-IndexFile BaseAdditions \
-DocumentationDirectory ../Documentation/BaseAdditions \
-HeaderDirectory ../Headers/GNUstepBase \
-Declared GNUstepBase \

View file

@ -50,6 +50,7 @@
unsigned sssect;
BOOL isContentsDoc;
BOOL ivarsAtEnd;
BOOL cssNavigation;
BOOL verbose;
BOOL warn;
}

View file

@ -27,8 +27,6 @@
#import "GNUstepBase/NSString+GNUstepBase.h"
#import "GNUstepBase/NSMutableString+GNUstepBase.h"
#define navcss 1
/*
* Define constants for use if we are built with apple Foundation
*/
@ -255,6 +253,7 @@ static NSMutableSet *textNodes = nil;
project = RETAIN([defs stringForKey: @"Project"]);
verbose = [defs boolForKey: @"Verbose"];
warn = [defs boolForKey: @"Warn"];
cssNavigation = [defs boolForKey: @"MakeFrames"] ? NO : YES;
}
return self;
}
@ -805,7 +804,7 @@ static NSMutableSet *textNodes = nil;
[self decIndent];
if (navcss)
if (cssNavigation)
{
[self decIndent];
[buf appendString: indent];
@ -1332,7 +1331,7 @@ static NSMutableSet *textNodes = nil;
[self incIndent];
}
if (navcss)
if (cssNavigation)
{
[buf appendString: indent];
[buf appendString: @"<div class=\"content-bar\">\n"];

View file

@ -813,6 +813,9 @@ main(int argc, char **argv, char **env)
@"FunctionsTemplate",
@"\t\tSTR\t(\"\")\n\tfile into which docs for macros "
@"should be consolidated",
@"IndexFile",
@"\t\tSTR\t(\"\")\n\tHTML file name (extension omitted) "
@"copied to index.html",
@"MacrosTemplate",
@"\t\tSTR\t(\"\")\n\tfile into which docs for typedefs "
@"should be consolidated",
@ -2102,6 +2105,9 @@ main(int argc, char **argv, char **env)
count = [gFiles count];
if (generateHtml == YES && count > 0)
{
NSString *htmlIndexFile;
htmlIndexFile = [defs stringForKey: @"IndexFile"];
pool = [NSAutoreleasePool new];
for (i = 0; i < count; i++)
@ -2208,6 +2214,17 @@ main(int argc, char **argv, char **env)
{
NSLog(@"Sorry unable to write %@", htmlfile);
}
if ([file isEqual: htmlIndexFile])
{
NSString *s;
s = [documentationDirectory
stringByAppendingPathComponent: @"index.html"];
if ([d writeToFile: s atomically: YES])
{
NSLog(@"Sorry unable to write %@ to %s", htmlfile, s);
}
}
}
}
else if ([arg hasSuffix: @".gsdoc"] == YES)