@@ -52,7 +52,7 @@ define PREPARE_LIB
52
52
$(nop )
53
53
@$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) )
54
54
$(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 ) ) ) ) , \
56
56
$(wildcard $(PREPARE_WORKING_DEST_LIB_DIR ) /$(1 ) ) ) "; \
57
57
if [ -n "$$MATCHES" ]; then \
58
58
echo "warning: one or libraries matching Rust library '$(1 ) '" && \
@@ -82,11 +82,11 @@ prepare-host-tool-$(1)-$(2)-$(3)-$(4): prepare-maybe-clean-$(4) \
82
82
$$(foreach dep,$$(TOOL_DEPS_$(1 ) ) ,prepare-host-lib-$$(dep ) -$(2 ) -$(3 ) -$(4 ) ) \
83
83
$$(HBIN$(2 ) _H_$(3 ) ) /$(1 )$$(X_$(3 ) ) \
84
84
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 ) ) , \
87
87
$$(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 ) ) , \
90
90
$$(call PREPARE_MAN,$(1 ) .1) ,) ,)
91
91
endef
92
92
@@ -101,12 +101,12 @@ define DEF_PREPARE_HOST_LIB
101
101
prepare-host-lib-$(1 ) -$(2 ) -$(3 ) -$(4 ) : PREPARE_WORKING_SOURCE_LIB_DIR=$$(PREPARE_SOURCE_LIB_DIR )
102
102
prepare-host-lib-$(1 ) -$(2 ) -$(3 ) -$(4 ) : PREPARE_WORKING_DEST_LIB_DIR=$$(PREPARE_DEST_LIB_DIR )
103
103
prepare-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 ) ) \
105
105
$$(HLIB$(2 ) _H_$(3 ) ) /stamp.$(1 ) \
106
106
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 ) ) ) ,, \
110
110
$$(call PREPARE_LIB,$$(call CFG_LIB_GLOB_$$(PREPARE_HOST ) ,$(1 ) ) ) ) ,) ,)
111
111
endef
112
112
@@ -129,17 +129,17 @@ prepare-target-$(2)-host-$(3)-$(1)-$(4): prepare-maybe-clean-$(4) \
129
129
# *not* install the rlibs for host crates because there's no need to statically
130
130
# link against most of them. They just produce a large amount of extra size
131
131
# 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 ) ) ) ) ,) \
143
143
$$(call PREPARE_LIB,libmorestack.a) \
144
144
$$(call PREPARE_LIB,libcompiler-rt.a) ,) ,) ,)
145
145
endef
@@ -160,36 +160,36 @@ prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1)
160
160
prepare-host-$(1 ) : prepare-host-tools-$(1 )
161
161
162
162
prepare-host-tools-$(1 ) : \
163
- $$(foreach tool, $$(PREPARE_TOOLS ) ,\
164
- $$(foreach host,$$(CFG_HOST ) ,\
163
+ $$(foreach tool, $$(PREPARE_TOOLS ) , \
164
+ $$(foreach host,$$(CFG_HOST ) , \
165
165
prepare-host-tool-$$(tool ) -$$(PREPARE_STAGE ) -$$(host ) -$(1 ) ) )
166
166
167
167
prepare-host-dirs-$(1 ) : prepare-maybe-clean-$(1 )
168
168
$$(call PREPARE_DIR,$$(PREPARE_DEST_BIN_DIR ) )
169
169
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR ) )
170
170
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR ) )
171
171
172
- $$(foreach tool,$$(PREPARE_TOOLS ) ,\
173
- $$(foreach host,$$(CFG_HOST ) ,\
172
+ $$(foreach tool,$$(PREPARE_TOOLS ) , \
173
+ $$(foreach host,$$(CFG_HOST ) , \
174
174
$$(eval $$(call DEF_PREPARE_HOST_TOOL,$$(tool ) ,$$(PREPARE_STAGE ) ,$$(host ) ,$(1 ) ) ) ) )
175
175
176
- $$(foreach lib,$$(CRATES ) ,\
177
- $$(foreach host,$$(CFG_HOST ) ,\
176
+ $$(foreach lib,$$(CRATES ) , \
177
+ $$(foreach host,$$(CFG_HOST ) , \
178
178
$$(eval $$(call DEF_PREPARE_HOST_LIB,$$(lib ) ,$$(PREPARE_STAGE ) ,$$(host ) ,$(1 ) ) ) ) )
179
179
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 ) , \
183
183
prepare-target-$$(target ) -host-$$(host ) -$$(PREPARE_STAGE ) -$(1 ) ) )
184
184
185
- $$(foreach host,$$(CFG_HOST ) ,\
185
+ $$(foreach host,$$(CFG_HOST ) , \
186
186
$$(foreach target,$$(CFG_TARGET ) , \
187
187
$$(eval $$(call DEF_PREPARE_TARGET_N,$$(PREPARE_STAGE ) ,$$(target ) ,$$(host ) ,$(1 ) ) ) ) )
188
188
189
189
prepare-maybe-clean-$(1 ) :
190
- $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) ,\
190
+ $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) , \
191
191
@$$(call E, cleaning destination $$(PREPARE_DEST_DIR ) ) ,)
192
- $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) ,\
192
+ $$(if $$(findstring true,$$(PREPARE_CLEAN ) ) , \
193
193
$$(Q ) rm -rf $$(PREPARE_DEST_DIR ) ,)
194
194
195
195
0 commit comments