]> xenbits.xensource.com Git - libvirt.git/commitdiff
maint: avoid empty regex in syntax checker
authorEric Blake <eblake@redhat.com>
Thu, 26 Jul 2012 14:29:15 +0000 (08:29 -0600)
committerEric Blake <eblake@redhat.com>
Thu, 26 Jul 2012 18:22:02 +0000 (12:22 -0600)
We were defining 'func_or' as '|VIR_ERROR|...', which when put
inside 'func_re' resulted in a regex that matches everything in
isolation.  Thankfully, we always used func_re with a leading
anchor \<, and since the empty regex does not start a word, we
happened to get the result we wanted; but it's better to define
func_or without a leading space converted into a leading empty
alternation.

* cfg.mk (func_or): Strip leading space.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 0bf909d32c76fc0da99a9c19e1e5b38fe549cc34..882b2bec15f80427ef5cf1201448ffbec3e549a2 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -547,7 +547,7 @@ msg_gen_function += xenapiSessionErrorHandler
 # msg_gen_function += vshPrint
 # msg_gen_function += vshError
 
-func_or := $(shell printf '$(msg_gen_function)'|tr -s '[[:space:]]' '|')
+func_or := $(shell echo $(msg_gen_function)|tr -s ' ' '|')
 func_re := ($(func_or))
 
 # Look for diagnostics that aren't marked for translation.