Skip to content

Commit

Permalink
fix rustbuild to build all the books
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Nov 21, 2018
1 parent 240a55c commit 0579ef0
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/bootstrap/doc.rs
Expand Up @@ -260,22 +260,31 @@ impl Step for TheBook {
let compiler = self.compiler;
let target = self.target;
let name = self.name;
// build book first edition

// build book
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(format!("{}/first-edition", name)),
name: INTERNER.intern_string(name.to_string()),
});

// build book second edition
// building older edition redirects

let source_name = format!("{}/first-edition", name);
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(format!("{}/second-edition", name)),
name: INTERNER.intern_string(source_name),
});

// build book 2018 edition
let source_name = format!("{}/second-edition", name);
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(format!("{}/2018-edition", name)),
name: INTERNER.intern_string(source_name),
});

let source_name = format!("{}/2018-edition", name);
builder.ensure(Rustbook {
target,
name: INTERNER.intern_string(source_name),
});

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

// build the index page
let index = format!("{}/index.md", name);
builder.info(&format!("Documenting book index ({})", target));
invoke_rustdoc(builder, compiler, target, &index);

// build the redirect pages
builder.info(&format!("Documenting book redirect pages ({})", target));
for file in t!(fs::read_dir(builder.src.join("src/doc/book/redirects"))) {
Expand Down

0 comments on commit 0579ef0

Please sign in to comment.