From 063e68b0b6db5bd732f1719c5fcfa8837837eb1a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 7 Mar 2016 22:34:13 -0800 Subject: [PATCH] rustbuild: Add `make check` and a check target We'll tack on more steps here later --- src/bootstrap/build/step.rs | 12 ++++++++++++ src/bootstrap/mk/Makefile.in | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/bootstrap/build/step.rs b/src/bootstrap/build/step.rs index ba0095ce849..fbdcddf3aa0 100644 --- a/src/bootstrap/build/step.rs +++ b/src/bootstrap/build/step.rs @@ -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![] + } } } } diff --git a/src/bootstrap/mk/Makefile.in b/src/bootstrap/mk/Makefile.in index fa3dee2f358..7d793002149 100644 --- a/src/bootstrap/mk/Makefile.in +++ b/src/bootstrap/mk/Makefile.in @@ -36,3 +36,5 @@ book: $(Q)$(BOOTSTRAP) --step doc-book standalone-docs: $(Q)$(BOOTSTRAP) --step doc-standalone +check: + $(Q)$(BOOTSTRAP) --step check