about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Throwe <wtt6@cornell.edu>2015-11-14 23:59:35 -0500
committerWilliam Throwe <wtt6@cornell.edu>2015-11-15 21:15:56 -0500
commit2b98d4fa55414571e213b9e632f8f4fb7067fbc1 (patch)
treee446b23ec1f0836a7ba65097871ed9eda4967cd6
parent8a813e088cf2169f1e1ff5a18c6b26d847885e3d (diff)
downloadrust-2b98d4fa55414571e213b9e632f8f4fb7067fbc1.tar.gz
rust-2b98d4fa55414571e213b9e632f8f4fb7067fbc1.zip
Prepare to the correct directory with --libdir
This is to handle the case where CFG_LIBDIR is not a direct child of
CFG_PREFIX (in other words, where CFG_LIBDIR_RELATIVE has more than
one component).
-rw-r--r--mk/main.mk7
-rw-r--r--mk/prepare.mk2
2 files changed, 5 insertions, 4 deletions
diff --git a/mk/main.mk b/mk/main.mk
index a5a4869ae9a..1be09ca7257 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -380,7 +380,7 @@ HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
 ifeq ($$(CFG_WINDOWSY_$(3)),1)
 # On Windows we always store host runtime libraries in the 'bin' directory because
 # there's no rpath. Target libraries go under $CFG_LIBDIR_RELATIVE (usually 'lib').
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
+HLIB_RELATIVE$(1)_H_$(3) = bin
 TROOT$(1)_T_$(2)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)/rustlib/$(2)
 # Remove the next 3 lines after a snapshot
 ifeq ($(1),0)
@@ -390,13 +390,14 @@ endif
 else
 
 ifeq ($(1),0)
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
+HLIB_RELATIVE$(1)_H_$(3) = lib
 else
-HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR_RELATIVE)
+HLIB_RELATIVE$(1)_H_$(3) = $$(CFG_LIBDIR_RELATIVE)
 endif
 TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustlib/$(2)
 
 endif
+HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(HLIB_RELATIVE$(1)_H_$(3))
 
 # Destinations of artifacts for target architectures
 TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
diff --git a/mk/prepare.mk b/mk/prepare.mk
index 8320eea8cf9..5a16afdf23a 100644
--- a/mk/prepare.mk
+++ b/mk/prepare.mk
@@ -115,7 +115,7 @@ define DEF_PREPARE_HOST_LIB
 prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
 	PREPARE_WORKING_SOURCE_LIB_DIR=$$(HLIB$(2)_H_$(3))
 prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
-	PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(notdir $$(HLIB$(2)_H_$(3)))
+	PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(HLIB_RELATIVE$(2)_H_$(3))
 prepare-host-lib-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
                                  $$(foreach dep,$$(RUST_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3)-$(4)) \
                                  $$(HLIB$(2)_H_$(3))/stamp.$(1) \