You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# $(3) is filename (usually the target being created) to filter out from match
241
-
# (i.e. filename is not out-of-date artifact from prior Rust version/build)
242
-
#
243
-
# Note that a common bug is to accidentally construct the glob denoted
244
-
# by $(2) with a space character prefix, which invalidates the
245
-
# construction $(1)$(2).
246
-
defineCHECK_FOR_OLD_GLOB_MATCHES_EXCEPT
247
-
$(Q)MATCHES="$(filter-out%$(3),$(wildcard$(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: there are previous" \'$(2)\' "libraries:" $$MATCHES; fi
248
-
endef
249
-
250
-
# Same interface as above, but deletes rather than just listing the files.
251
-
defineREMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT
252
-
$(Q)MATCHES="$(filter-out%$(3),$(wildcard$(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: removing previous" \'$(2)\' "libraries:" $$MATCHES; rm -v $$MATCHES ; fi
253
-
endef
254
-
255
-
# We use a different strategy for LIST_ALL_OLD_GLOB_MATCHES_EXCEPT
256
-
# than in the macros above because it needs the result of running the
257
-
# `ls` command after other rules in the command list have run; the
258
-
# macro-expander for $(wildcard ...) would deliver its results too
259
-
# soon. (This is in contrast to the macros above, which are meant to
260
-
# be run at the outset of a command list in a rule.)
261
-
ifdefVERBOSE
262
-
defineLIST_ALL_OLD_GLOB_MATCHES_EXCEPT
263
-
@echo "Info: now are following matches for" '$(2)' "libraries:"
264
-
@( cd $(1) && ( ls $(2) 2>/dev/null || true ) | grep -v $(3) || true )
0 commit comments