Skip to content
Commit dd5e620a authored by Thomas Petazzoni's avatar Thomas Petazzoni
Browse files

pkg-utils: introduce a make-based LOWERCASE function



Until now, our UPPERCASE function was implemented purely in make for
performance reasons, but our LOWERCASE function was implemented by
calling "tr", which was reasonable due to the fact that LOWERCASE was
rarely used, but future changes might make a more heavy usage of the
LOWERCASE macro.

We want this LOWERCASE function to turn a "_" into a "-" and not a
".", so we slightly adjust the existing FROM and TO lists to make this
possible. This doesn't change the behavior of the UPPERCASE macro
because both "-" and "." are converted into "_" by this function.

This change takes advantage of suggestions made by Arnout
Vandecappelle, who said they further improve the performance of
UPPERCASE and LOWERCASE by 30%/40%.

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent ad2e796d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment