|
19 | 19 | symlink_q(tgt, link) = isfile(link) || symlink(tgt, link)
|
20 | 20 | cp_q(src, dest) = isfile(dest) || cp(src, dest)
|
21 | 21 |
|
22 |
| -# make links for stdlib package docs |
23 |
| -if Sys.iswindows() |
24 |
| - cp_q("../stdlib/DelimitedFiles/docs/src/index.md", "src/stdlib/delimitedfiles.md") |
25 |
| - cp_q("../stdlib/Test/docs/src/index.md", "src/stdlib/test.md") |
26 |
| - cp_q("../stdlib/Mmap/docs/src/index.md", "src/stdlib/mmap.md") |
27 |
| - cp_q("../stdlib/SharedArrays/docs/src/index.md", "src/stdlib/sharedarrays.md") |
28 |
| - cp_q("../stdlib/Profile/docs/src/index.md", "src/stdlib/profile.md") |
29 |
| - cp_q("../stdlib/Base64/docs/src/index.md", "src/stdlib/base64.md") |
30 |
| - cp_q("../stdlib/FileWatching/docs/src/index.md", "src/stdlib/filewatching.md") |
31 |
| - cp_q("../stdlib/CRC32c/docs/src/index.md", "src/stdlib/crc32c.md") |
32 |
| - cp_q("../stdlib/Dates/docs/src/index.md", "src/stdlib/dates.md") |
33 |
| - cp_q("../stdlib/IterativeEigensolvers/docs/src/index.md", "src/stdlib/iterativeeigensolvers.md") |
34 |
| - cp_q("../stdlib/Unicode/docs/src/index.md", "src/stdlib/unicode.md") |
35 |
| - cp_q("../stdlib/Distributed/docs/src/index.md", "src/stdlib/distributed.md") |
36 |
| - cp_q("../stdlib/Printf/docs/src/index.md", "src/stdlib/printf.md") |
37 |
| -else |
38 |
| - symlink_q("../../../stdlib/DelimitedFiles/docs/src/index.md", "src/stdlib/delimitedfiles.md") |
39 |
| - symlink_q("../../../stdlib/Test/docs/src/index.md", "src/stdlib/test.md") |
40 |
| - symlink_q("../../../stdlib/Mmap/docs/src/index.md", "src/stdlib/mmap.md") |
41 |
| - symlink_q("../../../stdlib/SharedArrays/docs/src/index.md", "src/stdlib/sharedarrays.md") |
42 |
| - symlink_q("../../../stdlib/Profile/docs/src/index.md", "src/stdlib/profile.md") |
43 |
| - symlink_q("../../../stdlib/Base64/docs/src/index.md", "src/stdlib/base64.md") |
44 |
| - symlink_q("../../../stdlib/FileWatching/docs/src/index.md", "src/stdlib/filewatching.md") |
45 |
| - symlink_q("../../../stdlib/CRC32c/docs/src/index.md", "src/stdlib/crc32c.md") |
46 |
| - symlink_q("../../../stdlib/Dates/docs/src/index.md", "src/stdlib/dates.md") |
47 |
| - symlink_q("../../../stdlib/IterativeEigensolvers/docs/src/index.md", "src/stdlib/iterativeeigensolvers.md") |
48 |
| - symlink_q("../../../stdlib/Unicode/docs/src/index.md", "src/stdlib/unicode.md") |
49 |
| - symlink_q("../../../stdlib/Distributed/docs/src/index.md", "src/stdlib/distributed.md") |
50 |
| - symlink_q("../../../stdlib/Printf/docs/src/index.md", "src/stdlib/printf.md") |
| 22 | +# make links for stdlib package docs, this is needed until #522 in Documenter.jl is finished |
| 23 | +const STDLIB_DOCS = [] |
| 24 | +const STDLIB_DIR = joinpath(@__DIR__, "..", "stdlib") |
| 25 | +for dir in readdir(STDLIB_DIR) |
| 26 | + sourcefile = joinpath(STDLIB_DIR, dir, "docs", "src", "index.md") |
| 27 | + if isfile(sourcefile) |
| 28 | + cd(joinpath(@__DIR__, "src")) do |
| 29 | + isdir("stdlib") || mkdir("stdlib") |
| 30 | + targetfile = joinpath("stdlib", dir * ".md") |
| 31 | + push!(STDLIB_DOCS, (stdlib = Symbol(dir), targetfile = targetfile)) |
| 32 | + if Sys.iswindows() |
| 33 | + cp_q(sourcefile, targetfile) |
| 34 | + else |
| 35 | + symlink_q(sourcefile, targetfile) |
| 36 | + end |
| 37 | + end |
| 38 | + end |
51 | 39 | end
|
52 | 40 |
|
53 | 41 | const PAGES = [
|
@@ -93,42 +81,31 @@ const PAGES = [
|
93 | 81 | "manual/noteworthy-differences.md",
|
94 | 82 | "manual/unicode-input.md",
|
95 | 83 | ],
|
96 |
| - "Standard Library" => [ |
97 |
| - "stdlib/base.md", |
98 |
| - "stdlib/collections.md", |
99 |
| - "stdlib/math.md", |
100 |
| - "stdlib/numbers.md", |
101 |
| - "stdlib/strings.md", |
102 |
| - "stdlib/arrays.md", |
103 |
| - "stdlib/parallel.md", |
104 |
| - "stdlib/distributed.md", |
105 |
| - "stdlib/multi-threading.md", |
106 |
| - "stdlib/linalg.md", |
107 |
| - "stdlib/constants.md", |
108 |
| - "stdlib/file.md", |
109 |
| - "stdlib/delimitedfiles.md", |
110 |
| - "stdlib/io-network.md", |
111 |
| - "stdlib/punctuation.md", |
112 |
| - "stdlib/sort.md", |
113 |
| - "stdlib/pkg.md", |
114 |
| - "stdlib/dates.md", |
115 |
| - "stdlib/iterators.md", |
116 |
| - "stdlib/test.md", |
117 |
| - "stdlib/c.md", |
118 |
| - "stdlib/libc.md", |
119 |
| - "stdlib/libdl.md", |
120 |
| - "stdlib/profile.md", |
121 |
| - "stdlib/stacktraces.md", |
122 |
| - "stdlib/simd-types.md", |
123 |
| - "stdlib/base64.md", |
124 |
| - "stdlib/mmap.md", |
125 |
| - "stdlib/sharedarrays.md", |
126 |
| - "stdlib/filewatching.md", |
127 |
| - "stdlib/crc32c.md", |
128 |
| - "stdlib/iterativeeigensolvers.md", |
129 |
| - "stdlib/unicode.md", |
130 |
| - "stdlib/printf.md", |
| 84 | + "Base" => [ |
| 85 | + "base/base.md", |
| 86 | + "base/collections.md", |
| 87 | + "base/math.md", |
| 88 | + "base/numbers.md", |
| 89 | + "base/strings.md", |
| 90 | + "base/arrays.md", |
| 91 | + "base/parallel.md", |
| 92 | + "base/multi-threading.md", |
| 93 | + "base/linalg.md", |
| 94 | + "base/constants.md", |
| 95 | + "base/file.md", |
| 96 | + "base/io-network.md", |
| 97 | + "base/punctuation.md", |
| 98 | + "base/sort.md", |
| 99 | + "base/pkg.md", |
| 100 | + "base/iterators.md", |
| 101 | + "base/c.md", |
| 102 | + "base/libc.md", |
| 103 | + "base/libdl.md", |
| 104 | + "base/stacktraces.md", |
| 105 | + "base/simd-types.md", |
131 | 106 | ],
|
| 107 | + "Standard Library" => |
| 108 | + [stdlib.targetfile for stdlib in STDLIB_DOCS], |
132 | 109 | "Developer Documentation" => [
|
133 | 110 | "devdocs/reflection.md",
|
134 | 111 | "Documentation of Julia's Internals" => [
|
@@ -162,13 +139,13 @@ const PAGES = [
|
162 | 139 | ],
|
163 | 140 | ]
|
164 | 141 |
|
165 |
| -using DelimitedFiles, Test, Mmap, SharedArrays, Profile, Base64, FileWatching, CRC32c, |
166 |
| - Dates, IterativeEigensolvers, Unicode, Distributed, Printf |
| 142 | +for stdlib in STDLIB_DOCS |
| 143 | + @eval using $(stdlib.stdlib) |
| 144 | +end |
167 | 145 |
|
168 | 146 | makedocs(
|
169 | 147 | build = joinpath(pwd(), "_build/html/en"),
|
170 |
| - modules = [Base, Core, BuildSysImg, DelimitedFiles, Test, Mmap, SharedArrays, Profile, |
171 |
| - Base64, FileWatching, Dates, IterativeEigensolvers, Unicode, Distributed, Printf], |
| 148 | + modules = [Base, Core, BuildSysImg, [Module(stdlib.stdlib) for stdlib in STDLIB_DOCS]...], |
172 | 149 | clean = false,
|
173 | 150 | doctest = "doctest" in ARGS,
|
174 | 151 | linkcheck = "linkcheck" in ARGS,
|
|
0 commit comments