On Fri, 2013-04-19 at 18:07 -0600, David Sankel wrote:
> In section 7.3 and 8.2 the function 'findstring' is recommended as a
> means to search a space separated list for a given value. This
> suggestion is problematic as findstring really searches for
> substrings. So, for example $(findstring car,bicicle airplain
> carriage) will return a non-empty value. Instead it seems that
> 'filter' should be used for this kind of problem.

> Should the documentation in those sections be modified to note the
> problem and suggest using filter as an alternative?

The use in 7.3 specifically requires the use of findstring.  It won't
work to use filter, because the flags in MAKEFLAGS are condensed
together into a single string.

The example in the findstring description could be made more clear, yes,
by showing specifically that the match is on a substring and not the
whole word.



_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to