Added support for tool projects.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@12935 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Philippe C.D. Robert 2002-03-01 15:19:17 +00:00
parent 2db57284c5
commit 6b55050ba0
2 changed files with 64 additions and 8 deletions

View file

@ -29,6 +29,8 @@
- (void)appendClasses:(NSArray *)array;
- (void)appendCFiles:(NSArray *)array;
- (void)appendInstallDir:(NSString*)dir;
- (void)appendResources;
- (void)appendResourceItems:(NSArray *)array;
@ -49,7 +51,6 @@
- (void)appendApplication;
- (void)appendAppIcon:(NSString*)icn;
- (void)appendGuiLibraries:(NSArray*)array;
- (void)appendInstallDir:(NSString*)dir;
@end
@ -73,5 +74,13 @@
@end
@interface PCMakefileFactory (ToolProject)
- (void)appendTool;
- (void)appendToolIcon:(NSString*)icn;
- (void)appendToolLibraries:(NSArray*)array;
@end
#endif // _PCMAKEFILEFACTORY_H_

View file

@ -19,6 +19,7 @@
#define COMMENT_LIBRARIES @"\n\n#\n# Additional libraries\n#\n\n"
#define COMMENT_BUNDLE @"\n\n#\n# Bundle\n#\n\n"
#define COMMENT_LIBRARY @"\n\n#\n# Library\n#\n\n"
#define COMMENT_TOOL @"\n\n#\n# Tool\n#\n\n"
@implementation PCMakefileFactory
@ -118,6 +119,12 @@ static PCMakefileFactory *_factory = nil;
}
}
- (void)appendInstallDir:(NSString*)dir
{
[self appendString:
[NSString stringWithFormat:@"GNUSTEP_INSTALLATION_DIR=%@\n",dir]];
}
- (void)appendResources
{
[self appendString:COMMENT_RESOURCES];
@ -179,7 +186,13 @@ static PCMakefileFactory *_factory = nil;
- (void)appendTailForTool
{
[self appendString:@""];
[self appendString:@"\n\n"];
[self appendString:@"-include GNUmakefile.preamble\n"];
[self appendString:@"-include GNUmakefile.local\n"];
[self appendString:@"include $(GNUSTEP_MAKEFILES)/aggregate.make\n"];
[self appendString:@"include $(GNUSTEP_MAKEFILES)/tool.make\n"];
[self appendString:@"-include GNUmakefile.postamble\n"];
}
- (void)appendTailForBundle
@ -243,12 +256,6 @@ static PCMakefileFactory *_factory = nil;
}
}
- (void)appendInstallDir:(NSString*)dir
{
[self appendString:
[NSString stringWithFormat:@"GNUSTEP_INSTALLATION_DIR=%@\n",dir]];
}
@end
@implementation PCMakefileFactory (BundleProject)
@ -412,3 +419,43 @@ static PCMakefileFactory *_factory = nil;
@end
@implementation PCMakefileFactory (ToolProject)
- (void)appendTool
{
[self appendString:COMMENT_TOOL];
[self appendString:[NSString stringWithFormat:@"PACKAGE_NAME=%@\n",pnme]];
[self appendString:[NSString stringWithFormat:@"TOOL_NAME=%@\n",pnme]];
}
- (void)appendToolIcon:(NSString*)icn
{
[self appendString:
[NSString stringWithFormat:@"%@_TOOL_ICON=%@\n",pnme, icn]];
}
- (void)appendToolLibraries:(NSArray*)array
{
[self appendString:COMMENT_LIBRARIES];
[self appendString:[NSString stringWithFormat:@"%@_TOOL_LIBS += ",pnme]];
if( array && [array count] )
{
NSString *tmp;
NSEnumerator *enumerator = [array objectEnumerator];
while (tmp = [enumerator nextObject])
{
if (![tmp isEqualToString:@"gnustep-base"])
{
[self appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
}
}
}
}
@end