[Toybox] [PATCH] scripts/make.sh: don't call out to sed in getglobals()

enh enh at google.com
Sat Mar 4 12:09:32 PST 2023


Current macOS does have basename -s, and $(basename -s .c $i) works
fine too, but using bash's built-in regular expression support
shaves almost 2s off the total clean build time.

Config.in and globals.h are still where all the time goes before
the actual build starts, but 1-2s off 14s seems like a worthwhile
saving on a "MacBookPro18,1", especially if we're not using basename
anyway (which would be clearer than any regex option, and make it
harder to justify this).
---
 scripts/make.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-scripts-make.sh-don-t-call-out-to-sed-in-getglobals.patch
Type: application/octet-stream
Size: 1298 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20230304/2d7f91f3/attachment.obj>


More information about the Toybox mailing list