@@ -52,7 +52,7 @@ define PREPARE_LIB
5252 $(nop )
5353 @$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) )
5454 $(Q ) LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) "; \
55- MATCHES="$(filter-out % $(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) ,\
55+ MATCHES="$(filter-out % $(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR ) /$(1 ) ) ) ) , \
5656 $(wildcard $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) ) ) "; \
5757 if [ -n "$$MATCHES" ]; then \
5858 echo "warning: one or libraries matching Rust library '$(1 ) '" && \
@@ -82,11 +82,11 @@ prepare-host-tool-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
8282 $$(foreach dep,$$(TOOL_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) -$(4 ) ) \
8383 $$(HBIN$(2 ) _H_$(3 ) ) /$(1 )$$(X_$(3 ) ) \
8484 prepare-host-dirs-$(4 )
85- $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) ,\
86- $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) ,\
85+ $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) , \
86+ $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) , \
8787 $$(call PREPARE_BIN,$(1 )$$(X_$$(PREPARE_HOST ) ) ) ,) ,)
88- $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) ,\
89- $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) ,\
88+ $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) , \
89+ $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) , \
9090 $$(call PREPARE_MAN,$(1 ) .1) ,) ,)
9191endef
9292
@@ -101,12 +101,12 @@ define DEF_PREPARE_HOST_LIB
101101prepare-host-lib-$(1 ) -$(2 ) -$(3 ) -$(4 ) : PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR )
102102prepare-host-lib-$(1 ) -$(2 ) -$(3 ) -$(4 ) : PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR )
103103prepare-host-lib-$(1 ) -$(2 ) -$(3 ) -$(4 ) : prepare-maybe-clean-$(4 ) \
104- $$(foreach dep,$$(RUST_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) -$(4 ) ) \
104+ $$(foreach dep,$$(RUST_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) -$(4 ) ) \
105105 $$(HLIB$(2 ) _H_$(3 ) ) /stamp.$(1 ) \
106106 prepare-host-dirs-$(4 )
107- $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) ,\
108- $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) ,\
109- $$(if $$(findstring 1,$$(ONLY_RLIB_$(1 ) ) ) ,,\
107+ $$(if $$(findstring $(2 ) , $$(PREPARE_STAGE ) ) , \
108+ $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) , \
109+ $$(if $$(findstring 1,$$(ONLY_RLIB_$(1 ) ) ) ,, \
110110 $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$$(PREPARE_HOST ) ,$(1 ) ) ) ) ,) ,)
111111endef
112112
@@ -129,17 +129,17 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
129129# *not* install the rlibs for host crates because there's no need to statically
130130# link against most of them. They just produce a large amount of extra size
131131# bloat.
132- $$(if $$(findstring $(1 ) , $$(PREPARE_STAGE ) ) ,\
133- $$(if $$(findstring $(2 ) , $$(PREPARE_TARGETS ) ) ,\
134- $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) ,\
135- $$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR ) ) \
136- $$(foreach crate,$$(TARGET_CRATES ) ,\
137- $$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate ) ) ) ,,\
138- $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2 ) ,$$(crate ) ) ) ) \
139- $$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate ) ) ) ) \
140- $$(if $$(findstring $(2 ) ,$$(CFG_HOST ) ) ,\
141- $$(foreach crate,$$(HOST_CRATES ) ,\
142- $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2 ) ,$$(crate ) ) ) ) ,) \
132+ $$(if $$(findstring $(1 ) , $$(PREPARE_STAGE ) ) , \
133+ $$(if $$(findstring $(2 ) , $$(PREPARE_TARGETS ) ) , \
134+ $$(if $$(findstring $(3 ) , $$(PREPARE_HOST ) ) , \
135+ $$(call PREPARE_DIR,$$(PREPARE_WORKING_DEST_LIB_DIR ) ) \
136+ $$(foreach crate,$$(TARGET_CRATES ) , \
137+ $$(if $$(findstring 1, $$(ONLY_RLIB_$$(crate ) ) ) ,, \
138+ $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2 ) ,$$(crate ) ) ) ) \
139+ $$(call PREPARE_LIB,$$(call CFG_RLIB_GLOB,$$(crate ) ) ) ) \
140+ $$(if $$(findstring $(2 ) ,$$(CFG_HOST ) ) , \
141+ $$(foreach crate,$$(HOST_CRATES ) , \
142+ $$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$(2 ) ,$$(crate ) ) ) ) ,) \
143143 $$(call PREPARE_LIB,libmorestack.a) \
144144 $$(call PREPARE_LIB,libcompiler-rt.a) ,) ,) ,)
145145endef
@@ -160,36 +160,36 @@ prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1)
160160prepare-host-$(1 ) : prepare-host-tools-$(1 )
161161
162162prepare-host-tools-$(1 ) : \
163- $$(foreach tool, $$(PREPARE_TOOLS ) ,\
164- $$(foreach host,$$(CFG_HOST ) ,\
163+ $$(foreach tool, $$(PREPARE_TOOLS ) , \
164+ $$(foreach host,$$(CFG_HOST ) , \
165165 prepare-host-tool-$$(tool ) -$$(PREPARE_STAGE ) -$$(host ) -$(1 ) ) )
166166
167167prepare-host-dirs-$(1 ) : prepare-maybe-clean-$(1 )
168168 $$(call PREPARE_DIR,$$(PREPARE_DEST_BIN_DIR ) )
169169 $$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR ) )
170170 $$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR ) )
171171
172- $$(foreach tool,$$(PREPARE_TOOLS ) ,\
173- $$(foreach host,$$(CFG_HOST ) ,\
172+ $$(foreach tool,$$(PREPARE_TOOLS ) , \
173+ $$(foreach host,$$(CFG_HOST ) , \
174174 $$(eval $$(call DEF_PREPARE_HOST_TOOL,$$(tool ) ,$$(PREPARE_STAGE ) ,$$(host ) ,$(1 ) ) ) ) )
175175
176- $$(foreach lib,$$(CRATES ) ,\
177- $$(foreach host,$$(CFG_HOST ) ,\
176+ $$(foreach lib,$$(CRATES ) , \
177+ $$(foreach host,$$(CFG_HOST ) , \
178178 $$(eval $$(call DEF_PREPARE_HOST_LIB,$$(lib ) ,$$(PREPARE_STAGE ) ,$$(host ) ,$(1 ) ) ) ) )
179179
180- prepare-targets-$(1 ) :\
181- $$(foreach host,$$(CFG_HOST ) ,\
182- $$(foreach target,$$(CFG_TARGET ) ,\
180+ prepare-targets-$(1 ) : \
181+ $$(foreach host,$$(CFG_HOST ) , \
182+ $$(foreach target,$$(CFG_TARGET ) , \
183183 prepare-target-$$(target ) -host-$$(host ) -$$(PREPARE_STAGE ) -$(1 ) ) )
184184
185- $$(foreach host,$$(CFG_HOST ) ,\
185+ $$(foreach host,$$(CFG_HOST ) , \
186186 $$(foreach target,$$(CFG_TARGET ) , \
187187 $$(eval $$(call DEF_PREPARE_TARGET_N,$$(PREPARE_STAGE ) ,$$(target ) ,$$(host ) ,$(1 ) ) ) ) )
188188
189189prepare-maybe-clean-$(1 ) :
190- $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) ,\
190+ $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) , \
191191 @$$(call E, cleaning destination $$(PREPARE_DEST_DIR ) ) ,)
192- $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) ,\
192+ $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) , \
193193 $$(Q ) rm -rf $$(PREPARE_DEST_DIR ) ,)
194194
195195
0 commit comments