-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
import "ide"
#else
#ifdef ECERE_STATIC
static void OutputLog(const char * string)
{
-#ifdef MAKEFILE_GENERATOR
- printf("%s", string);
-#else
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
ide.outputView.buildBox.Log(string);
+#else
+ printf("%s", string);
#endif
}
}
}
- char * GetFullFilePath(char * buffer)
+ char * GetFullFilePath(char * buffer, bool resolveVars)
{
if(buffer)
{
strcpy(buffer, root.path);
- PathCatSlash(buffer, path);
- PathCatSlash(buffer, name);
+ if(resolveVars)
+ {
+ if(path && path[0])
+ {
+ DirExpression pathExp { };
+ Project project = property::project;
+ CompilerConfig compiler = GetCompilerConfig();
+ ProjectConfig config = project.config;
+ int bitDepth = GetBitDepth();
+ pathExp.Evaluate(path, project, compiler, config, bitDepth);
+ PathCatSlash(buffer, pathExp.dir);
+ delete compiler;
+ delete pathExp;
+ }
+ PathCatSlash(buffer, name);
+ }
+ else
+ {
+ PathCatSlash(buffer, path);
+ PathCatSlash(buffer, name);
+ }
}
return buffer;
}
else if(child.name && !fstrcmp(lastDirName, child.name))
{
char p[MAX_LOCATION];
- child.GetFullFilePath(p);
+ child.GetFullFilePath(p, true);
if(!fstrcmp(p, path))
{
result = child;
return node;
}
-#ifndef MAKEFILE_GENERATOR
+#if !defined(ECERE_DOCUMENTOR) && !defined(ECERE_EPJ2MAKE)
void OnDisplay(Surface surface, int x, int y, int width, ProjectView projectView, Alignment alignment, DataDisplayFlags displayFlags)
{
char label[MAX_FILENAME];
collision = info ? info.IsExtensionColliding(extension) : false;
sprintf(s, "%s$(OBJ)%s%s%s$(O)%s", ts.a, moduleName, collision ? "." : "", collision ? extension : "", ts.b);
items.Add(CopyString(s));
- if(containsCXX && (!strcmpi(extension, "cpp") || !strcmpi(extension, "cc") || !strcmpi(extension, "cxx")))
- *containsCXX = true;
}
+ else if(printType == noPrint && containsCXX &&
+ (!strcmpi(extension, "cpp") || !strcmpi(extension, "cc") || !strcmpi(extension, "cxx")))
+ *containsCXX = true;
}
delete ts;
}
moduleName, collision ? "." : "", collision ? extension : "",
modulePath, moduleName, extension);
if(!strcmpi(extension, "cc") || !strcmpi(extension, "cpp") || !strcmpi(extension, "cxx"))
- f.Printf("\t$(CXX)");
+ f.Printf("\t$(CXX) $(CXXFLAGS)");
else if(!strcmpi(extension, "rc"))
f.Printf("\t$(WINDRES) $(WINDRES_FLAGS) $< \"$(call escspace,$(call quote_path,$@))\"\n");
else
- f.Printf("\t$(CC)");
+ f.Printf("\t$(CC) $(CFLAGS)");
if(strcmpi(extension, "rc") != 0)
{
- f.Puts(" $(CFLAGS)");
GenMakePrintNodeFlagsVariable(this, nodeCFlagsMapping, "PRJ_CFLAGS", f);
if(!strcmpi(extension, "ec"))
delete platforms;
}
- void GenMakefileAddResources(File f, String resourcesPath, ProjectConfig prjConfig)
+ void GenMakefileAddResources(File f, String resourcesPath, ProjectConfig prjConfig, const char * resourcesTarget)
{
int count = 0;
if(files)
// $(EAR) aw%s --- /*quiet ? "q" : */""
if(count == 0)
- f.Printf("\t%s$(EAR) aw$(EARFLAGS) $(TARGET)", ts.a);
+ f.Printf("\t%s$(EAR) aw$(EARFLAGS) $(%s)", ts.a, resourcesTarget);
tempPath[0] = '\0';
if(eString_PathInsideOfMore(child.path, resourcesPath, tempPath))
for(child : files)
{
if(child.type == folder)
- child.GenMakefileAddResources(f, resourcesPath, prjConfig);
+ child.GenMakefileAddResources(f, resourcesPath, prjConfig, resourcesTarget);
}
}
}
if(!strcmpi(extension, &h2s))
{
char filePath[MAX_LOCATION];
- GetFullFilePath(filePath);
+ GetFullFilePath(filePath, true);
OutputLog($"No compilation required for header file "); OutputLog(filePath); OutputLog("\n");
ChangeExtension(moduleName, h2s, moduleName);
if(prj.topNode.Find(moduleName, false))
break;
}
else
- map[s] = null;
+ mit.Remove();
+ // TOFIX: Templates map[s] = null;
}
if(result)
{