-$$(HLIB$(2)_H_$(4))/$(CFG_STDLIB_$(4)): \
- $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_STDLIB_$(4)) \
- $$(HLIB$(2)_H_$(4))/$(CFG_RUNTIME_$(4)) \
- | $$(HLIB$(2)_H_$(4))/
- @$$(call E, cp: $$@)
- $$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
- $$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_RGLOB_$(4)),$$(notdir $$@))
- $$(Q)cp $$< $$@
-# Subtle: We do not let the shell expand $$(STDLIB_DSYM_GLOB) directly rather
-# we use Make's $$(wildcard) facility. The reason is that, on mac, when using
-# USE_SNAPSHOT_STDLIB, we copy the std.dylib file out of the snapshot.
-# In that case, there is no .dSYM file. Annoyingly, bash then refuses to expand
-# glob, and cp reports an error because libstd-*.dylib.dsym does not exist.
-# Make instead expands the glob to nothing, which gives us the correct behavior.
-# (Copy .dsym file if it exists, but do nothing otherwise)
- $$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB_$(4)) \
- $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_RGLOB_$(4))) \
- $$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_DSYM_GLOB_$(4))) \
- $$(HLIB$(2)_H_$(4))
- $$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
- $$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_RGLOB_$(4)),$$(notdir $$@))