gendepend improvements; refs #5144

This commit is contained in:
Araq 2017-01-06 13:09:39 +01:00
commit 4910a87c6f
2 changed files with 9 additions and 1 deletions

View file

@ -31,11 +31,19 @@ proc semanticPasses =
registerPass verbosePass
registerPass semPass
proc writeDepsFile(g: ModuleGraph; project: string) =
let f = open(changeFileExt(project, "deps"), fmWrite)
for m in g.modules:
if m != nil:
f.writeLine(toFullPath(m.position.int32))
f.close()
proc commandGenDepend(graph: ModuleGraph; cache: IdentCache) =
semanticPasses()
registerPass(gendependPass)
#registerPass(cleanupPass)
compileProject(graph, cache)
writeDepsFile(graph, gProjectFull)
generateDot(gProjectFull)
execExternalProgram("dot -Tpng -o" & changeFileExt(gProjectFull, "png") &
' ' & changeFileExt(gProjectFull, "dot"))