diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-02-06 02:17:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 11:17:00 +0100 |
commit | 7ec7731f824b933cdd4f4a1f816c1f3e4862bef6 (patch) | |
tree | b1aee83d00485f447539390e5eb807df5704b7b8 /tools/kochdocs.nim | |
parent | 574f61315d015033dbf20e4840a645057b0c2060 (diff) | |
download | Nim-7ec7731f824b933cdd4f4a1f816c1f3e4862bef6.tar.gz |
fix #13150 `nim doc --project` now works reliably (#13223)
* fix #13150 `nim doc --project` works with duplicate names and with imports below main project file * add to help; fixup after #13212 isRelativeTo got merged * fix test tests/compilerapi/tcompilerapi.nim * remove nimblePkg field; compute on the fly instead * kochdocs: compiler docs now under compiler/ * --docRoot now has smart default: best among @pkg, @path
Diffstat (limited to 'tools/kochdocs.nim')
-rw-r--r-- | tools/kochdocs.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index a9be64f09..09b3268d1 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -319,9 +319,11 @@ proc buildDoc(nimArgs, destPath: string) = destPath / changeFileExt(splitFile(d).name, "html"), d] i.inc for d in items(doc): - commands[i] = nim & " doc $# --git.url:$# -o:$# --index:on $#" % - [nimArgs, gitUrl, - destPath / changeFileExt(splitFile(d).name, "html"), d] + var nimArgs2 = nimArgs + if d.isRelativeTo("compiler"): + nimArgs2.add " --docroot" + commands[i] = nim & " doc $# --git.url:$# --outdir:$# --index:on $#" % + [nimArgs2, gitUrl, destPath, d] i.inc for d in items(withoutIndex): commands[i] = nim & " doc2 $# --git.url:$# -o:$# $#" % |