Macro __gmsl_space is incompatibility to latest GNU Make 4.3
Brought to you by:
jgrahamc
Hi!
The current method to define the macro gmsl_space is no longer supported in the lates release of GNU make; I.e., as described in NEWS (file):
Previously appending using '+=' to an empty variable would result in a value
starting with a space. Now the initial space is only added if the variable
already contains some value. Similarly, appending an empty string does not
add a trailing space.
IMHO, following change (as unified diff) will fix this issue and is also backward-compatible:
Index: __gmsl
===================================================================
--- __gmsl (revision trun)
+++ __gmsl (working copy)
@@ -396,8 +396,8 @@
# This results in __gmsl_space containing just a space
-__gmsl_space :=
-__gmsl_space +=
+__gmsl_empty :=
+__gmsl_space := $(__gmsl_empty) $(__gmsl_empty)
strlen = $(__gmsl_tr1)$(call assert_no_dollar,$0,$1)$(strip $(eval __temp := $(subst $(__gmsl_space),x,$1))$(foreach a,$(__gmsl_characters),$(eval __temp := $$(subst $$a,x,$(__temp))))$(eval __temp := $(subst x,x ,$(__temp)))$(words $(__temp)))
Best regards from Salzburg,
Markus
Thanks!