From cf002e9d32a9b838f11933f3e1d38b6ffdbc0f98 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 13 Nov 2012 13:32:49 -0800 Subject: [PATCH] Tools should not be build prereqs of tests. Closes #3946 --- Makefile.in | 29 ++++++++++++++++++----------- mk/install.mk | 4 ++-- mk/tests.mk | 3 ++- src/test/compile-fail/qquote-1.rs | 1 + 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Makefile.in b/Makefile.in index 90ae9937c36..34f98406e84 100644 --- a/Makefile.in +++ b/Makefile.in @@ -341,6 +341,7 @@ HSREQ$(1)_H_$(3) = \ $$(HLIB$(1)_H_$(3))/$$(CFG_RUSTLLVM) \ $$(HCORELIB_DEFAULT$(1)_H_$(3)) \ $$(HSTDLIB_DEFAULT$(1)_H_$(3)) \ + $$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \ $$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \ $$(MKFILE_DEPS) @@ -350,17 +351,31 @@ TSREQ$(1)_T_$(2)_H_$(3) = \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUNTIME) \ $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a -# Prerequisites for complete stageN targets +# Prerequisites for a working stageN compiler and libraries SREQ$(1)_T_$(2)_H_$(3) = \ $$(TSREQ$(1)_T_$(2)_H_$(3)) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) + +# Prerequisites for a working stageN compiler and libraries +CSREQ$(1)_T_$(2)_H_$(3) = \ + $$(TSREQ$(1)_T_$(2)_H_$(3)) \ + $$(HBIN$(1)_H_$(3))/fuzzer$$(X) \ + $$(HBIN$(1)_H_$(3))/cargo$$(X) \ + $$(HBIN$(1)_H_$(3))/rustdoc$$(X) \ + $$(HBIN$(1)_H_$(3))/rusti$$(X) \ + $$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \ + $$(HLIB$(1)_H_$(3))/$$(CFG_LIBCARGO) \ + $$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \ + $$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCARGO) \ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) ifeq ($(1),0) # Don't run the the stage0 compiler under valgrind - that ship has sailed @@ -461,15 +476,7 @@ all: $(SREQ1$(CFG_HOST_TRIPLE)) $(GENERATED) docs else -TSREQS := \ - $(foreach target,$(CFG_TARGET_TRIPLES), \ - $(SREQ3_T_$(target)_H_$(CFG_HOST_TRIPLE))) -FUZZ := $(HBIN2_H_$(CFG_HOST_TRIPLE))/fuzzer$(X) -CARGO := $(HBIN2_H_$(CFG_HOST_TRIPLE))/cargo$(X) -RUSTDOC := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rustdoc$(X) -RUSTI := $(HBIN2_H_$(CFG_HOST_TRIPLE))/rusti$(X) - -all: rustc $(GENERATED) docs $(FUZZ) $(CARGO) $(RUSTDOC) $(RUSTI) +all: $(CSREQ3$(CFG_HOST_TRIPLE)) $(GENERATED) docs endif diff --git a/mk/install.mk b/mk/install.mk index 059a889beb9..8115cdd6c32 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -33,7 +33,7 @@ PTR$(1)$(2) = $$(PREFIX_LIB)/rustc/$(1) PTB$(1)$(2) = $$(PTR$(1)$(2))/bin PTL$(1)$(2) = $$(PTR$(1)$(2))/$(CFG_LIBDIR) -install-target-$(1)-host-$(2): $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) +install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(Q)mkdir -p $$(PTL$(1)$(2)) $$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(CFG_RUNTIME)) $$(Q)$$(call INSTALL_LIB, \ @@ -74,7 +74,7 @@ PHB = $(PREFIX_BIN) # Shorthand for the prefix bin directory PHL = $(PREFIX_LIB) -install-host: $(SREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) +install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE)) $(Q)mkdir -p $(PREFIX_BIN) $(Q)mkdir -p $(PREFIX_LIB) $(Q)mkdir -p $(PREFIX_ROOT)/share/man/man1 diff --git a/mk/tests.mk b/mk/tests.mk index 29e6b08efc0..cd38de6be10 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -352,7 +352,8 @@ $(3)/test/rustctest.stage$(1)-$(2)$$(X): \ $$(COMPILER_CRATE) \ $$(COMPILER_INPUTS) \ $$(SREQ$(1)_T_$(2)_H_$(3)) \ - $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \ + $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test diff --git a/src/test/compile-fail/qquote-1.rs b/src/test/compile-fail/qquote-1.rs index c7911c76218..505528d95ba 100644 --- a/src/test/compile-fail/qquote-1.rs +++ b/src/test/compile-fail/qquote-1.rs @@ -1,3 +1,4 @@ +// xfail-test Can't use syntax crate here extern mod std; extern mod syntax;