documentation generator works again

This commit is contained in:
Andreas Rumpf 2018-05-15 10:03:06 +02:00
commit c73cd5349e
2 changed files with 9 additions and 9 deletions

View file

@ -188,43 +188,43 @@ proc mainCommand*(graph: ModuleGraph; cache: IdentCache) =
of "doc0": of "doc0":
wantMainModule(conf) wantMainModule(conf)
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
commandDoc(conf) commandDoc(conf)
of "doc2", "doc": of "doc2", "doc":
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
defineSymbol(conf.symbols, "nimdoc") defineSymbol(conf.symbols, "nimdoc")
commandDoc2(graph, cache, false) commandDoc2(graph, cache, false)
of "rst2html": of "rst2html":
conf.cmd = cmdRst2html conf.cmd = cmdRst2html
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
commandRst2Html(conf) commandRst2Html(conf)
of "rst2tex": of "rst2tex":
conf.cmd = cmdRst2tex conf.cmd = cmdRst2tex
loadConfigs(DocTexConfig, cache) loadConfigs(DocTexConfig, cache, conf)
commandRst2TeX(conf) commandRst2TeX(conf)
of "jsondoc0": of "jsondoc0":
wantMainModule(conf) wantMainModule(conf)
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
wantMainModule(conf) wantMainModule(conf)
defineSymbol(conf.symbols, "nimdoc") defineSymbol(conf.symbols, "nimdoc")
commandJson(conf) commandJson(conf)
of "jsondoc2", "jsondoc": of "jsondoc2", "jsondoc":
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
wantMainModule(conf) wantMainModule(conf)
defineSymbol(conf.symbols, "nimdoc") defineSymbol(conf.symbols, "nimdoc")
commandDoc2(graph, cache, true) commandDoc2(graph, cache, true)
of "ctags": of "ctags":
wantMainModule(conf) wantMainModule(conf)
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
defineSymbol(conf.symbols, "nimdoc") defineSymbol(conf.symbols, "nimdoc")
commandTags(conf) commandTags(conf)
of "buildindex": of "buildindex":
conf.cmd = cmdDoc conf.cmd = cmdDoc
loadConfigs(DocConfig, cache) loadConfigs(DocConfig, cache, conf)
commandBuildIndex(conf) commandBuildIndex(conf)
of "gendepend": of "gendepend":
conf.cmd = cmdGenDepend conf.cmd = cmdGenDepend

View file

@ -230,7 +230,7 @@ proc getSystemConfigPath(conf: ConfigRef; filename: string): string =
if not existsFile(result): result = joinPath([p, "etc", filename]) if not existsFile(result): result = joinPath([p, "etc", filename])
if not existsFile(result): result = "/etc/" & filename if not existsFile(result): result = "/etc/" & filename
proc loadConfigs*(cfg: string; cache: IdentCache; conf: ConfigRef = nil) = proc loadConfigs*(cfg: string; cache: IdentCache; conf: ConfigRef) =
setDefaultLibpath(conf) setDefaultLibpath(conf)
if optSkipConfigFile notin conf.globalOptions: if optSkipConfigFile notin conf.globalOptions: