From 8573a1319a63fa61d1db9b9ff8239b5eeb3c1d56 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Tue, 7 Mar 2017 14:49:50 -0500 Subject: [PATCH] build both editions of the book --- src/bootstrap/doc.rs | 5 +++++ src/bootstrap/step.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index db8ed579cec..3c024f4c4ef 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -53,6 +53,11 @@ pub fn rustbook(build: &Build, target: &str, name: &str) { .arg(out)); } +pub fn book(build: &Build, target: &str, name: &str) { + rustbook(build, target, &format!("{}/first-edition", name)); + rustbook(build, target, &format!("{}/second-edition", name)); +} + /// Generates all standalone documentation as compiled by the rustdoc in `stage` /// for the `target` into `out`. /// diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index 6b047c62d99..6eb12fed5ab 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -581,7 +581,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { .stage(0) }) .default(build.config.docs) - .run(move |s| doc::rustbook(build, s.target, "book")); + .run(move |s| doc::book(build, s.target, "book")); rules.doc("doc-nomicon", "src/doc/nomicon") .dep(move |s| { s.name("tool-rustbook")