Skip to content

Commit d53496b

Browse files
committed
Auto merge of #29653 - alexcrichton:fix-distcheck-again-zomg, r=brson
The recent change of libdir on windows was accidentally not propagated to `make dist` and related commands. This commit touches that up! Closes #29640
2 parents 41308a0 + 3d619d7 commit d53496b

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

mk/prepare.mk

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS
9090
# $(3) is host
9191
# $(4) tag
9292
define DEF_PREPARE_HOST_TOOL
93+
prepare-host-tool-$(1)-$(2)-$(3)-$(4): \
94+
PREPARE_SOURCE_BIN_DIR=$$(HBIN$(2)_H_$(3))
9395
prepare-host-tool-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
9496
$$(foreach dep,$$(TOOL_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3)-$(4)) \
9597
$$(HBIN$(2)_H_$(3))/$(1)$$(X_$(3)) \
@@ -110,8 +112,10 @@ endef
110112
# $(3) is host
111113
# $(4) tag
112114
define DEF_PREPARE_HOST_LIB
113-
prepare-host-lib-$(1)-$(2)-$(3)-$(4): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)
114-
prepare-host-lib-$(1)-$(2)-$(3)-$(4): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)
115+
prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
116+
PREPARE_WORKING_SOURCE_LIB_DIR=$$(HLIB$(2)_H_$(3))
117+
prepare-host-lib-$(1)-$(2)-$(3)-$(4): \
118+
PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(notdir $$(HLIB$(2)_H_$(3)))
115119
prepare-host-lib-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
116120
$$(foreach dep,$$(RUST_DEPS_$(1)),prepare-host-lib-$$(dep)-$(2)-$(3)-$(4)) \
117121
$$(HLIB$(2)_H_$(3))/stamp.$(1) \
@@ -129,10 +133,14 @@ endef
129133
# $(4) tag
130134
define DEF_PREPARE_TARGET_N
131135
# Rebind PREPARE_*_LIB_DIR to point to rustlib, then install the libs for the targets
132-
prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR)/rustlib/$(2)/lib
133-
prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(2)/lib
134-
prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_SOURCE_BIN_DIR=$$(PREPARE_SOURCE_LIB_DIR)/rustlib/$(3)/bin
135-
prepare-target-$(2)-host-$(3)-$(1)-$(4): PREPARE_DEST_BIN_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(3)/bin
136+
prepare-target-$(2)-host-$(3)-$(1)-$(4): \
137+
PREPARE_WORKING_SOURCE_LIB_DIR=$$(TLIB$(1)_T_$(2)_H_$(3))
138+
prepare-target-$(2)-host-$(3)-$(1)-$(4): \
139+
PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(2)/lib
140+
prepare-target-$(2)-host-$(3)-$(1)-$(4): \
141+
PREPARE_SOURCE_BIN_DIR=$$(TBIN$(1)_T_$(2)_H_$(3))
142+
prepare-target-$(2)-host-$(3)-$(1)-$(4): \
143+
PREPARE_DEST_BIN_DIR=$$(PREPARE_DEST_LIB_DIR)/rustlib/$(3)/bin
136144
prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
137145
$$(foreach crate,$$(TARGET_CRATES), \
138146
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
@@ -185,9 +193,6 @@ INSTALL_DEBUGGER_SCRIPT_COMMANDS=$(if $(findstring windows,$(1)),\
185193

186194
define DEF_PREPARE
187195

188-
prepare-base-$(1)-%: PREPARE_SOURCE_DIR=$$(PREPARE_HOST)/stage$$(PREPARE_STAGE)
189-
prepare-base-$(1)-%: PREPARE_SOURCE_BIN_DIR=$$(PREPARE_SOURCE_DIR)/bin
190-
prepare-base-$(1)-%: PREPARE_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_DIR)/$$(CFG_LIBDIR_RELATIVE)
191196
prepare-base-$(1)-%: PREPARE_SOURCE_MAN_DIR=$$(S)/man
192197
prepare-base-$(1)-%: PREPARE_DEST_BIN_DIR=$$(PREPARE_DEST_DIR)/bin
193198
prepare-base-$(1)-%: PREPARE_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)

0 commit comments

Comments
 (0)