}
#ifndef MAKEFILE_GENERATOR
+ ProjectNode GetObjectFileNode(const char * filePath)
+ {
+ ProjectNode node = null;
+ char ext[MAX_EXTENSION];
+ GetExtension(filePath, ext);
+ if(ext[0])
+ {
+ IntermediateFileType type = IntermediateFileType::FromExtension(ext);
+ if(type)
+ {
+ char fileName[MAX_FILENAME];
+ GetLastDirectory(filePath, fileName);
+ if(fileName[0])
+ {
+ DotMain dotMain = DotMain::FromFileName(fileName);
+ node = FindNodeByObjectFileName(fileName, type, dotMain, null);
+ }
+ }
+ }
+ return node;
+ }
+
+ bool GetAbsoluteFromRelativePath(const char * relativePath, char * absolutePath)
+ {
+ ProjectNode node = topNode.FindWithPath(relativePath, false);
+ if(!node)
+ node = GetObjectFileNode(relativePath);
+ if(node)
+ {
+ strcpy(absolutePath, node.project.topNode.path);
+ PathCat(absolutePath, relativePath);
+ MakeSlashPath(absolutePath);
+ }
+ return node != null;
+ }
+
void MarkChanges(ProjectNode node)
{
for(cfg : topNode.configurations)
; // ignore this new gnu make error but what is it about?
else if(strstr(line, compiler.makeCommand) == line && line[lenMakeCommand] == ':')
{
- const char * module = strstr(line, "No rule to make target `");
+ const char * moduleBackTick = strstr(line, "No rule to make target `");
+ const char * module = moduleBackTick ? moduleBackTick : strstr(line, "No rule to make target '");
if(module)
{
char * end;
- module = strchr(module, '`') + 1;
+ module = strchr(module, moduleBackTick ? '`' : '\'') + 1;
end = strchr(module, '\'');
if(end)
{