Skip to content

Commit 0579ef0

Browse files
committed
fix rustbuild to build all the books
1 parent 240a55c commit 0579ef0

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/bootstrap/doc.rs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,31 @@ impl Step for TheBook {
260260
let compiler = self.compiler;
261261
let target = self.target;
262262
let name = self.name;
263-
// build book first edition
263+
264+
// build book
264265
builder.ensure(Rustbook {
265266
target,
266-
name: INTERNER.intern_string(format!("{}/first-edition", name)),
267+
name: INTERNER.intern_string(name.to_string()),
267268
});
268269

269-
// build book second edition
270+
// building older edition redirects
271+
272+
let source_name = format!("{}/first-edition", name);
270273
builder.ensure(Rustbook {
271274
target,
272-
name: INTERNER.intern_string(format!("{}/second-edition", name)),
275+
name: INTERNER.intern_string(source_name),
273276
});
274277

275-
// build book 2018 edition
278+
let source_name = format!("{}/second-edition", name);
276279
builder.ensure(Rustbook {
277280
target,
278-
name: INTERNER.intern_string(format!("{}/2018-edition", name)),
281+
name: INTERNER.intern_string(source_name),
282+
});
283+
284+
let source_name = format!("{}/2018-edition", name);
285+
builder.ensure(Rustbook {
286+
target,
287+
name: INTERNER.intern_string(source_name),
279288
});
280289

281290
// build the version info page and CSS
@@ -284,11 +293,6 @@ impl Step for TheBook {
284293
target,
285294
});
286295

287-
// build the index page
288-
let index = format!("{}/index.md", name);
289-
builder.info(&format!("Documenting book index ({})", target));
290-
invoke_rustdoc(builder, compiler, target, &index);
291-
292296
// build the redirect pages
293297
builder.info(&format!("Documenting book redirect pages ({})", target));
294298
for file in t!(fs::read_dir(builder.src.join("src/doc/book/redirects"))) {

0 commit comments

Comments
 (0)