about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-16 07:34:05 +0000
committerbors <bors@rust-lang.org>2015-11-16 07:34:05 +0000
commitaf5d9d65e781d587414b266fb2e5815ed85f0bd3 (patch)
tree6749336dd665e09b8e31feedf21bdae0912d9cbf
parentbf783896569a64d661bc6c7233492943e8c2f726 (diff)
parent2b98d4fa55414571e213b9e632f8f4fb7067fbc1 (diff)
downloadrust-af5d9d65e781d587414b266fb2e5815ed85f0bd3.tar.gz
rust-af5d9d65e781d587414b266fb2e5815ed85f0bd3.zip
Auto merge of #29845 - wthrowe:libdir, r=alexcrichton
This should get `--libdir` working as well as it was a couple of weeks ago.  (That is, it still rewrites paths incorrectly but it no longer fails during `make install`.)

Fixes gentoo/gentoo-rust#28 and gentoo/gentoo-rust#29.
-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) \