use util::{cp_r, symlink_dir};
use build_helper::up_to_date;
+// rules.doc("doc-nomicon", "src/doc/nomicon")
+// .dep(move |s| {
+// s.name("tool-rustbook")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .default(build.config.docs)
+// .run(move |s| doc::rustbook(build, s.target, "nomicon"));
+// rules.doc("doc-reference", "src/doc/reference")
+// .dep(move |s| {
+// s.name("tool-rustbook")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .default(build.config.docs)
+// .run(move |s| doc::rustbook(build, s.target, "reference"));
/// Invoke `rustbook` for `target` for the doc book `name`.
///
/// This will not actually generate any documentation if the documentation has
rustbook_src(build, target, name, &src);
}
+//rules.doc("doc-unstable-book", "src/doc/unstable-book")
+// .dep(move |s| {
+// s.name("tool-rustbook")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .dep(move |s| s.name("doc-unstable-book-gen"))
+// .default(build.config.docs)
+// .run(move |s| doc::rustbook_src(build,
+// s.target,
+// "unstable-book",
+// &build.md_doc_out(s.target)));
+
+
/// Invoke `rustbook` for `target` for the doc book `name` from the `src` path.
///
/// This will not actually generate any documentation if the documentation has
.arg(out));
}
+// rules.doc("doc-book", "src/doc/book")
+// .dep(move |s| {
+// s.name("tool-rustbook")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .default(build.config.docs)
+// .run(move |s| doc::book(build, s.target, "book"));
/// Build the book and associated stuff.
///
/// We need to build:
build.run(&mut cmd);
}
+// rules.doc("doc-standalone", "src/doc")
+// .dep(move |s| {
+// s.name("rustc")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .default(build.config.docs)
+// .run(move |s| doc::standalone(build, s.target));
/// Generates all standalone documentation as compiled by the rustdoc in `stage`
/// for the `target` into `out`.
///
}
}
+// for (krate, path, default) in krates("std") {
+// rules.doc(&krate.doc_step, path)
+// .dep(|s| s.name("libstd-link"))
+// .default(default && build.config.docs)
+// .run(move |s| doc::std(build, s.stage, s.target));
+// }
/// Compile all standard library documentation.
///
/// This will generate all documentation for the standard library and its
cp_r(&my_out, &out);
}
+// for (krate, path, default) in krates("test") {
+// rules.doc(&krate.doc_step, path)
+// .dep(|s| s.name("libtest-link"))
+// // Needed so rustdoc generates relative links to std.
+// .dep(|s| s.name("doc-crate-std"))
+// .default(default && build.config.compiler_docs)
+// .run(move |s| doc::test(build, s.stage, s.target));
+// }
/// Compile all libtest documentation.
///
/// This will generate all documentation for libtest and its dependencies. This
cp_r(&my_out, &out);
}
+
+// for (krate, path, default) in krates("rustc-main") {
+// rules.doc(&krate.doc_step, path)
+// .dep(|s| s.name("librustc-link"))
+// // Needed so rustdoc generates relative links to std.
+// .dep(|s| s.name("doc-crate-std"))
+// .host(true)
+// .default(default && build.config.docs)
+// .run(move |s| doc::rustc(build, s.stage, s.target));
+// }
+//
/// Generate all compiler documentation.
///
/// This will generate all documentation for the compiler libraries and their
cp_r(&my_out, &out);
}
+// rules.doc("doc-error-index", "src/tools/error_index_generator")
+// .dep(move |s| s.name("tool-error-index").target(&build.build).stage(0))
+// .dep(move |s| s.name("librustc-link"))
+// .default(build.config.docs)
+// .host(true)
+// .run(move |s| doc::error_index(build, s.target));
+
/// Generates the HTML rendered error-index by running the
/// `error_index_generator` tool.
pub fn error_index(build: &Build, target: &str) {
build.run(&mut index);
}
+// rules.doc("doc-unstable-book-gen", "src/tools/unstable-book-gen")
+// .dep(move |s| {
+// s.name("tool-unstable-book-gen")
+// .host(&build.build)
+// .target(&build.build)
+// .stage(0)
+// })
+// .dep(move |s| s.name("libstd-link"))
+// .default(build.config.docs)
+// .host(true)
+// .run(move |s| doc::unstable_book_gen(build, s.target));
+
pub fn unstable_book_gen(build: &Build, target: &str) {
println!("Generating unstable book md files ({})", target);
let out = build.md_doc_out(target).join("unstable-book");