From aa581f6e3f8cb9e007de97c6d3f25b2ff9b6533d Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 19 Apr 2014 22:53:00 +0000 Subject: [PATCH] build: Run tr only once in configure.ac. The configure script creates the subsystem error enums for config.h from the list of object file names by turning the base name into upper case and prepending "SS_". For the conversion to upper case we currently execute the tr command once for each object. This patch changes the corresponding shell code of configure.ac to first build the full enum and then turn all words into upper case in one go. This way tr is only executed once which should save us a few cycles. --- configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 6f8878a3..e4010bde 100644 --- a/configure.ac +++ b/configure.ac @@ -1541,9 +1541,8 @@ done # use echo to replace newlines by space AC_SUBST(object_executable_matrix, $(echo $object_executable_matrix)) -for obj in $all_errlist_objs; do - SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z')," -done +SS=$(for obj in $all_errlist_objs; do + printf '%s' " SS_$obj,"; done | tr 'a-z' 'A-Z') AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM, [enum {$SS NUM_SS}], [list of all objects that use the paraslash error facility] -- 2.39.5