tech-userlevel archive

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

Re: make: Unfinished character list in pattern



On Sun, Nov 01, 2026 at 01:38:46PM +0100, Roland Illig wrote:
 > That's because when make(1) parses a character range such as '+-]', it
 > treats ']' as an ordinary character. The range is thus from '+' to ']',
 > which includes all uppercase letters.
 > 
 > After make(1) has determined that the character range matches, it scans
 > for the closing ']' of the character list, but it surprisingly starts
 > from the beginning of the character range. This time, the ']' is not an
 > ordinary character anymore but instead finishes the character list.

...so that's a bug, and the obvious fix is to make it scan correctly.

There are and have been plenty of other cases where make rescans
strings and doesn't do it quite the same each time, and it just
shouldn't do that.

(It doesn't matter if it's been wrong for 35 years; that doesn't grant
any virtue to the wrong behavior.)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index