Mk/Scripts/do-depends.sh: summarize dependency errors
Accumulate and number dependency resolution errors in do-depends.sh
instead of only setting a flag, so that a clear summary of all errors
is printed at the end of the run rather than being buried in the
output of the dependency traversal. (#257069)
Add a record_error() helper that increments an error counter, prints
each error to stderr, and accumulates the messages for the final
summary. Use printf "%b" with a literal format string to avoid
interpreting user-controlled data (origins, patterns) as format
specifiers.
PR: 257069
Submitted by: sobomax@FreeBSD.org