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).
This commit is contained in:
William Throwe 2015-11-14 23:59:35 -05:00
parent 8a813e088c
commit 2b98d4fa55
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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) \