rustbuild: Add `make check` and a check target

We'll tack on more steps here later
This commit is contained in:
Alex Crichton 2016-03-07 22:34:13 -08:00
parent 388ccda455
commit 063e68b0b6
2 changed files with 14 additions and 0 deletions

View File

@ -53,11 +53,19 @@ macro_rules! targets {
// with braces are unstable so we just pick something that works.
(llvm, Llvm { _dummy: () }),
(compiler_rt, CompilerRt { _dummy: () }),
// Steps for various pieces of documentation that we can generate,
// the 'doc' step is just a pseudo target to depend on a bunch of
// others.
(doc, Doc { stage: u32 }),
(doc_book, DocBook { stage: u32 }),
(doc_nomicon, DocNomicon { stage: u32 }),
(doc_style, DocStyle { stage: u32 }),
(doc_standalone, DocStandalone { stage: u32 }),
// Steps for running tests. The 'check' target is just a pseudo
// target to depend on a bunch of others.
(check, Check { stage: u32, compiler: Compiler<'a> }),
}
}
}
@ -175,6 +183,7 @@ fn add_steps<'a>(build: &'a Build,
"doc-nomicon" => targets.push(host.doc_nomicon(stage)),
"doc-book" => targets.push(host.doc_book(stage)),
"doc" => targets.push(host.doc(stage)),
"check" => targets.push(host.check(stage, compiler)),
_ => panic!("unknown build target: `{}`", step),
}
}
@ -240,6 +249,9 @@ impl<'a> Step<'a> {
vec![self.doc_book(stage), self.doc_nomicon(stage),
self.doc_style(stage), self.doc_standalone(stage)]
}
Source::Check { stage, compiler: _ } => {
vec![]
}
}
}
}

View File

@ -36,3 +36,5 @@ book:
$(Q)$(BOOTSTRAP) --step doc-book
standalone-docs:
$(Q)$(BOOTSTRAP) --step doc-standalone
check:
$(Q)$(BOOTSTRAP) --step check