diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-12-21 17:15:59 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-12-21 17:15:59 +0100 |
commit | b96213d5595b5a101f5855a303e8f5da58249518 (patch) | |
tree | 26e55e5d379c0a8cebc045959cc767939e797fa4 /compiler/main.nim | |
parent | 8c0e73479e0ec31fdda83751400f8b515e8e43d7 (diff) | |
parent | da90657317e8a57bae80ebd2d637a972d3b438ab (diff) | |
download | Nim-b96213d5595b5a101f5855a303e8f5da58249518.tar.gz |
Merge branch 'pyokagan-compile-deps' into devel
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 1e94a6ca0..08fc4b138 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,8 @@ proc commandCompileToC(graph: ModuleGraph; cache: IdentCache) = let proj = changeFileExt(gProjectFull, "") extccomp.callCCompiler(proj) extccomp.writeJsonBuildInstructions(proj) + if optGenScript in gGlobalOptions: + writeDepsFile(graph, toGeneratedFile(proj, "")) proc commandJsonScript(graph: ModuleGraph; cache: IdentCache) = let proj = changeFileExt(gProjectFull, "") |