Skip to content

Commit 29436d5

Browse files
committed
auto merge of #13142 : alexcrichton/rust/issue-13118, r=brson
The previous dependency calculation was based on an arbitrary set of asterisks at an arbitrary depth, but using the recursive version should be much more robust in figuring out what's dependent.
2 parents 13dafa0 + 4709364 commit 29436d5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Diff for: Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ include config.mk
177177

178178
# Just a few macros used everywhere
179179
include $(CFG_SRC_DIR)mk/util.mk
180-
# All crates and their dependencies
181-
include $(CFG_SRC_DIR)mk/crates.mk
182180
# Reconfiguring when the makefiles or submodules change
183181
include $(CFG_SRC_DIR)mk/reconfig.mk
182+
# All crates and their dependencies
183+
include $(CFG_SRC_DIR)mk/crates.mk
184184
# Various bits of setup, common macros, and top-level rules
185185
include $(CFG_SRC_DIR)mk/main.mk
186186
# C and assembly components that are not LLVM

Diff for: mk/crates.mk

+2-4
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ COMPILER_DOC_CRATES := rustc syntax
105105
# $(1) is the crate to generate variables for
106106
define RUST_CRATE
107107
CRATEFILE_$(1) := $$(S)src/lib$(1)/lib.rs
108-
RSINPUTS_$(1) := $$(wildcard $$(addprefix $(S)src/lib$(1), \
109-
*.rs */*.rs */*/*.rs */*/*/*.rs))
108+
RSINPUTS_$(1) := $$(call rwildcard,$(S)src/lib$(1)/,*.rs)
110109
RUST_DEPS_$(1) := $$(filter-out native:%,$$(DEPS_$(1)))
111110
NATIVE_DEPS_$(1) := $$(patsubst native:%,%,$$(filter native:%,$$(DEPS_$(1))))
112111
endef
@@ -117,8 +116,7 @@ $(foreach crate,$(CRATES),$(eval $(call RUST_CRATE,$(crate))))
117116
#
118117
# $(1) is the crate to generate variables for
119118
define RUST_TOOL
120-
TOOL_INPUTS_$(1) := $$(wildcard $$(addprefix $$(dir $$(TOOL_SOURCE_$(1))), \
121-
*.rs */*.rs */*/*.rs */*/*/*.rs))
119+
TOOL_INPUTS_$(1) := $$(call rwildcard,$$(dir $$(TOOL_SOURCE_$(1))),*.rs)
122120
endef
123121

124122
$(foreach crate,$(TOOLS),$(eval $(call RUST_TOOL,$(crate))))

0 commit comments

Comments
 (0)