bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example use of findstring in documentation can be problematic


From: Paul Smith
Subject: Re: Example use of findstring in documentation can be problematic
Date: Sat, 20 Apr 2013 11:47:53 -0400

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]