maint: avoid empty regex in syntax checker

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.
This commit is contained in:
Eric Blake 2012-07-26 08:29:15 -06:00
parent 4fedf388f6
commit 72181978d5

2
cfg.mk
View File

@ -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.