Update Makefile

This commit is contained in:
Guillaume Gomez 2016-02-07 13:03:11 +01:00
parent 6407b9405f
commit ed6b575648
5 changed files with 52 additions and 22 deletions

View File

@ -62,6 +62,7 @@ RUSTBOOK = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(RUSTBOOK_EXE)
# The error-index-generator executable... # The error-index-generator executable...
ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD)) ERR_IDX_GEN_EXE = $(HBIN2_H_$(CFG_BUILD))/error-index-generator$(X_$(CFG_BUILD))
ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE) ERR_IDX_GEN = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE)
ERR_IDX_GEN_MD = $(RPATH_VAR2_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(ERR_IDX_GEN_EXE) markdown
D := $(S)src/doc D := $(S)src/doc
@ -217,6 +218,12 @@ doc/style/index.html: $(RUSTBOOK_EXE) $(wildcard $(S)/src/doc/style/*.md) | doc/
error-index: doc/error-index.html error-index: doc/error-index.html
doc/error-index.html: $(ERR_IDX_GEN_EXE) | doc/ # Metadata used to generate the index is created as a side effect of
# the build so this depends on every crate being up to date.
doc/error-index.html: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
$(Q)$(call E, error-index-generator: $@) $(Q)$(call E, error-index-generator: $@)
$(Q)$(ERR_IDX_GEN) $(Q)$(ERR_IDX_GEN)
doc/error-index.md: $(ERR_IDX_GEN_EXE) $(CSREQ$(2)_T_$(CFG_BUILD)_H_$(CFG_BUILD)) | doc/
$(Q)$(call E, error-index-generator: $@)
$(Q)$(ERR_IDX_GEN_MD)

View File

@ -298,14 +298,14 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \ check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \ check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \ check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \ check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
check-stage$(1)-T-$(2)-H-$(3)-crates-exec \ check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \ check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \ check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \ check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \ check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
@ -673,8 +673,8 @@ CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS) CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS) CTEST_DEPS_codegen-units_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_UNITS_TESTS)
CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \ CTEST_DEPS_rustdocck_$(1)-T-$(2)-H-$(3) = $$(RUSTDOCCK_TESTS) \
$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \ $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
$(S)src/etc/htmldocck.py $(S)src/etc/htmldocck.py
endef endef
@ -892,6 +892,28 @@ $(foreach host,$(CFG_HOST), \
$(foreach crate,$(TEST_DOC_CRATES), \ $(foreach crate,$(TEST_DOC_CRATES), \
$(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate))))))) $(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate)))))))
define DEF_DOC_TEST_ERROR_INDEX
check-stage$(1)-T-$(2)-H-$(3)-doc-error-index-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index)
ifeq ($(2),$$(CFG_BUILD))
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index): \
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
doc/error-index.md
$$(Q)touch $$@.start_time
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test doc/error-index.md
$$(Q)touch -r $$@.start_time $$@ && rm $$@.start_time
else
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-error-index):
$$(Q)touch $$@
endif
endef
$(foreach host,$(CFG_HOST), \
$(foreach target,$(CFG_TARGET), \
$(foreach stage,$(STAGES), \
$(eval $(call DEF_DOC_TEST_ERROR_INDEX,$(stage),$(target),$(host))))))
###################################################################### ######################################################################
# Shortcut rules # Shortcut rules
###################################################################### ######################################################################
@ -901,7 +923,7 @@ TEST_GROUPS = \
$(foreach crate,$(TEST_CRATES),$(crate)) \ $(foreach crate,$(TEST_CRATES),$(crate)) \
$(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \ $(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
rpass \ rpass \
rpass-valgrind \ rpass-valgrind \
rpass-full \ rpass-full \
rfail-full \ rfail-full \
cfail-full \ cfail-full \
@ -918,7 +940,7 @@ TEST_GROUPS = \
$(foreach docname,$(DOC_NAMES),doc-$(docname)) \ $(foreach docname,$(DOC_NAMES),doc-$(docname)) \
pretty \ pretty \
pretty-rpass \ pretty-rpass \
pretty-rpass-valgrind \ pretty-rpass-valgrind \
pretty-rpass-full \ pretty-rpass-full \
pretty-rfail-full \ pretty-rfail-full \
pretty-rfail \ pretty-rfail \
@ -987,7 +1009,8 @@ define DEF_CHECK_DOC_FOR_STAGE
check-stage$(1)-docs: $$(foreach docname,$$(DOC_NAMES), \ check-stage$(1)-docs: $$(foreach docname,$$(DOC_NAMES), \
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \ check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
$$(foreach crate,$$(TEST_DOC_CRATES), \ $$(foreach crate,$$(TEST_DOC_CRATES), \
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate)) check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate)) \
check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-error-index-exec
endef endef
$(foreach stage,$(STAGES), \ $(foreach stage,$(STAGES), \

View File

@ -131,8 +131,8 @@ String to be moved into a variable called `s`.
let x = Some("s".to_string()); let x = Some("s".to_string());
match x { match x {
op_string @ Some(s) => {} op_string @ Some(s) => {},
None => {} None => {},
} }
``` ```
@ -145,10 +145,10 @@ name is bound by move in a pattern, it should also be moved to wherever it is
referenced in the pattern guard code. Doing so however would prevent the name referenced in the pattern guard code. Doing so however would prevent the name
from being available in the body of the match arm. Consider the following: from being available in the body of the match arm. Consider the following:
``` ```compile_fail
match Some("hi".to_string()) { match Some("hi".to_string()) {
Some(s) if s.len() == 0 => // use s. Some(s) if s.len() == 0 => {}, // use s.
_ => {} _ => {},
} }
``` ```
@ -159,11 +159,11 @@ therefore become unavailable in the body of the arm. Although this example seems
innocuous, the problem is most clear when considering functions that take their innocuous, the problem is most clear when considering functions that take their
argument by value. argument by value.
``` ```compile_fail
match Some("hi".to_string()) { match Some("hi".to_string()) {
Some(s) if { drop(s); false } => (), Some(s) if { drop(s); false } => (),
Some(s) => // use s. Some(s) => {}, // use s.
_ => {} _ => {},
} }
``` ```
@ -1645,7 +1645,7 @@ let x: i32 = "I am not a number!";
Another situation in which this occurs is when you attempt to use the `try!` Another situation in which this occurs is when you attempt to use the `try!`
macro inside a function that does not return a `Result<T, E>`: macro inside a function that does not return a `Result<T, E>`:
``` ```compile_fail
use std::fs::File; use std::fs::File;
fn main() { fn main() {

View File

@ -1406,7 +1406,7 @@ fn main() {
To solve this situation, constrain the type of the variable. To solve this situation, constrain the type of the variable.
Examples: Examples:
``` ```no_run
#![allow(unused_variables)] #![allow(unused_variables)]
fn some_func(x: &u32) { fn some_func(x: &u32) {

View File

@ -579,7 +579,7 @@ mod tests {
t("rust", false, false, false, true, false, false); t("rust", false, false, false, true, false, false);
t("sh", false, false, false, false, false, false); t("sh", false, false, false, false, false, false);
t("ignore", false, false, true, true, false, false); t("ignore", false, false, true, true, false, false);
t("should_panic", true, false, false, true, false, false); t("should_panic", true, true, false, true, false, false);
t("no_run", false, true, false, true, false, false); t("no_run", false, true, false, true, false, false);
t("test_harness", false, false, false, true, true, false); t("test_harness", false, false, false, true, true, false);
t("compile_fail", false, false, false, true, false, true); t("compile_fail", false, false, false, true, false, true);