Skip to content

Commit

Permalink
convertGNUmakefile(...) function
Browse files Browse the repository at this point in the history
  • Loading branch information
gcasa committed Sep 22, 2024
1 parent 2db8b88 commit 31ffaee
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Tools/pc2xc/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ void buildPhase(NSArray *items, PBXBuildPhase *phase)
return buildContainer(projectName, projectType, files, headers, allResources, other, frameworks);
}

PBXContainer *convertGNUmakfile(NSString *inputString)
{
return nil;
}

BOOL buildXCodeProj(PBXContainer *container, NSString *dn)
{
NSError *error = nil;
Expand Down Expand Up @@ -260,24 +265,32 @@ int main(int argc, const char *argv[])
NSString *input = [NSString stringWithUTF8String: argv[1]];
NSString *output = [NSString stringWithUTF8String: argv[2]];
PBXContainer *container = nil;
NSDictionary *proj = nil;

if ([[input lastPathComponent] isEqualToString: @"PB.project"])
{
NSDictionary *proj = [NSDictionary dictionaryWithContentsOfFile: input];

proj = [NSDictionary dictionaryWithContentsOfFile: input];
xcprintf("== Parsing an old style NeXT project: %s -> %s\n",
[input UTF8String], [output UTF8String]);
container = convertPBProject(proj);
}
else if ([[input pathExtension] isEqualToString: @"pcproj"])
{
NSString *path = [input stringByAppendingPathComponent: @"PC.project"];
NSDictionary *proj = [NSDictionary dictionaryWithContentsOfFile: path];

printf("== Parsing a ProjectCenter project: %s -> %s\n",
proj = [NSDictionary dictionaryWithContentsOfFile: path];
xcprintf("== Parsing a ProjectCenter project: %s -> %s\n",
[input UTF8String], [output UTF8String]);
container = convertPCProject(proj);
}
else if ([input isEqualToString: @"GNUmakefile"])
{
NSString *fileData = [NSString stringWithContentsOfFile: input];
xcprintf("== Parsing a ProjectCenter project: %s -> %s\n",
[input UTF8String], [output UTF8String]);

container = convertGNUmakfile(fileData);
}
else
{
xcprintf("== Unknown project type");
Expand Down

0 comments on commit 31ffaee

Please sign in to comment.