diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-12-21 17:00:54 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-12-21 17:00:54 +0100 |
commit | 5516fee1a7f5fe2f44592b91a93c379f6181e48e (patch) | |
tree | e6f9f79be033fb022a19f7b7fb515d8322044902 | |
parent | 8c0e73479e0ec31fdda83751400f8b515e8e43d7 (diff) | |
parent | b06c0f97a4640c16b2205635b378a39fcef9b814 (diff) | |
download | Nim-5516fee1a7f5fe2f44592b91a93c379f6181e48e.tar.gz |
Merge branch 'compile-deps' of https://github.com/pyokagan/Nim into pyokagan-compile-deps
-rw-r--r-- | compiler/main.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 1e94a6ca0..db03f0e4d 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -16,7 +16,7 @@ import cgen, jsgen, json, nversion, platform, nimconf, importer, passaux, depends, vm, vmdef, types, idgen, docgen2, service, parser, modules, ccgutils, sigmatch, ropes, - modulegraphs + modulegraphs, tables from magicsys import systemModule, resetSysTypes @@ -36,6 +36,9 @@ proc writeDepsFile(g: ModuleGraph; project: string) = for m in g.modules: if m != nil: f.writeLine(toFullPath(m.position.int32)) + for k in g.inclToMod.keys: + if g.getModule(k).isNil: # don't repeat includes which are also modules + f.writeLine(k.toFullPath) f.close() proc commandGenDepend(graph: ModuleGraph; cache: IdentCache) = @@ -77,6 +80,7 @@ proc commandCompileToC(graph: ModuleGraph; cache: IdentCache) = let proj = changeFileExt(gProjectFull, "") extccomp.callCCompiler(proj) extccomp.writeJsonBuildInstructions(proj) + writeDepsFile(graph, toGeneratedFile(proj, "")) proc commandJsonScript(graph: ModuleGraph; cache: IdentCache) = let proj = changeFileExt(gProjectFull, "") |