[libvirt] [PATCH 4/7] cfg.mk: use subst instead of tr

Ján Tomko jtomko at redhat.com
Wed Aug 3 16:20:49 UTC 2016


GNU make is able to replace characters, no need to call tr.
---
 cfg.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index cf47d4c..0604d69 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -614,8 +614,9 @@ msg_gen_function += xenapiSessionErrorHandler
 # msg_gen_function += vshPrint
 # msg_gen_function += vshError
 
-func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|')
-func_re := ($(func_or))
+space =
+space +=
+func_re= ($(subst $(space),|,$(msg_gen_function)))
 
 # Look for diagnostics that aren't marked for translation.
 # This won't find any for which error's format string is on a separate line.
-- 
2.7.3




More information about the libvir-list mailing list