tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: make: Unfinished character list in pattern
Am 13.10.2026 um 17:04 schrieb Edgar Fuß:
> make(1) from -11 chokes on character lists in globs ending with a hyphen:
>
> foo= foo bar foo-bar
>
> default:
> echo ${foo:M*[+-]*}
>
> However, glob(7) says
>
> In order to represent itself, a `-' must either be quoted
> or the first or last character in the character list.
>
> and this works as expected with make(1) from -10.
That was a deliberate change in order to catch cases where the end of a
range was accidentally omitted.
The wording in make's manual page doesn't refer to glob(7), it doesn't
even suggest what the semantics of the "standard shell wildcard
characters" might be. And in fact, make(1)'s :M modifier differs from
glob(7) in many more edge cases.
You can write :M*[-+]* instead.
$ make -v '${:U a +b ,c -d :M*[-+]*}'
Roland
Home |
Main Index |
Thread Index |
Old Index