From ed106dd6eaa7d2140c082852d95f79717a48d23d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 30 Sep 2011 12:08:51 -0700 Subject: [PATCH] Fix some make variables in tests.mk --- Makefile.in | 36 ++++++++++++++++++++++-------------- mk/tests.mk | 6 +++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Makefile.in b/Makefile.in index a0a1e3f6f6e..c8059f7280c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -168,25 +168,33 @@ LLC := $(CFG_LLVM_BINDIR)/llc$(X) ###################################################################### define SREQ + +TARGET_ROOT$(1)$(2) = stage$(1)/lib/rustc/$(2) +TARGET_BIN$(1)$(2) = $(TARGET_ROOT$(1)$(2))/bin +TARGET_LIB$(1)$(2) = $(TARGET_ROOT$(1)$(2))/lib +HOST_ROOT$(1) = $(TARGET_ROOT$(1)$$(CFG_HOST_TRIPLE)) +HOST_BIN$(1) = $(TARGET_BIN$(1)$$(CFG_HOST_TRIPLE)) +HOST_LIB$(1) = $(TARGET_LIB$(1)$$(CFG_HOST_TRIPLE)) + ifdef CFG_DISABLE_SHAREDSTD -SREQ$(1)$(2) = stage$(1)/bin/rustc$(X) \ - stage$(1)/lib/$$(CFG_RUNTIME) \ +SREQ$(1)$(2) = $(HOST_BIN$(1))/rustc$(X) \ + $(HOST_LIB$(1))/$$(CFG_RUNTIME) \ $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ - stage$(1)/lib/$$(CFG_RUSTLLVM) \ - stage$(1)/lib/rustc/$(2)/$$(CFG_RUNTIME) \ - stage$(1)/lib/rustc/$(2)/$$(CFG_STDLIB) \ - stage$(1)/lib/rustc/$(2)/intrinsics.bc \ - stage$(1)/lib/rustc/$(2)/main.o \ + $(HOST_LIB$(1))/$$(CFG_RUSTLLVM) \ + $(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME) \ + $(TARGET_LIB$(1)$(2))/$$(CFG_STDLIB) \ + $(TARGET_LIB$(1)$(2))/intrinsics.bc \ + $(TARGET_LIB$(1)$(2))/main.o \ $$(MKFILES) else -SREQ$(1)$(2) = stage$(1)/bin/rustc$(X) \ - stage$(1)/lib/$$(CFG_RUNTIME) \ +SREQ$(1)$(2) = $(HOST_BIN$(1))/rustc$(X) \ + $(HOST_LIB$(1))/$$(CFG_RUNTIME) \ $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \ - stage$(1)/lib/$$(CFG_RUSTLLVM) \ - stage$(1)/lib/rustc/$(2)/$$(CFG_RUNTIME) \ - stage$(1)/lib/rustc/$(2)/$$(CFG_STDLIB) \ - stage$(1)/lib/rustc/$(2)/intrinsics.bc \ - stage$(1)/lib/rustc/$(2)/main.o \ + $(HOST_LIB$(1))/$$(CFG_RUSTLLVM) \ + $(TARGET_LIB$(1)$(2))/$$(CFG_RUNTIME) \ + $(TARGET_LIB$(1)$(2))/$$(CFG_STDLIB) \ + $(TARGET_LIB$(1)$(2))/intrinsics.bc \ + $(TARGET_LIB$(1)$(2))/main.o \ $$(MKFILES) endif diff --git a/mk/tests.mk b/mk/tests.mk index 1c298885dbf..130c8113934 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -131,7 +131,7 @@ check-stage$(2): tidy \ check-stage$(2)-std: test/stdtest.stage$(2).out \ test/stdtest.stage$(2)$$(X): $$(STDTEST_CRATE) $$(STDTEST_INPUTS) \ - $$(SREQ$(2)$(CFG_HOST_TRIPLE)) + $$(SREQ$(2)$$(CFG_HOST_TRIPLE)) @$$(call E, compile_and_link: $$@) $$(STAGE$(2)) -o $$@ $$< --test @@ -149,7 +149,7 @@ test/rustctest.stage$(2)$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \ stage$(2)/lib/$$(CFG_RUNTIME) \ $$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(2)) \ stage$(2)/lib/$$(CFG_RUSTLLVM) \ - $$(SREQ$(1)$(CFG_HOST_TRIPLE)) + $$(SREQ$(1)$$(CFG_HOST_TRIPLE)) @$$(call E, compile_and_link: $$@) $$(STAGE$(1)) -o $$@ $$< --test @@ -243,7 +243,7 @@ PRETTY_PRETTY_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \ test/compiletest.stage$(2)$$(X): $$(COMPILETEST_CRATE) \ $$(COMPILETEST_INPUTS) \ - $$(SREQ$(2)$(CFG_HOST_TRIPLE)) + $$(SREQ$(2)$$(CFG_HOST_TRIPLE)) @$$(call E, compile_and_link: $$@) $$(STAGE$(2)) -o $$@ $$<