On Sun, 2023-03-05 at 23:09 +0100, Arkadiusz Drabczyk wrote: > "If the @code{.POSIX} special target is defined then > backslash/newline handling is modified slightly to conform to > POSIX.2: first, whitespace preceding a backslash is not removed and > second, consecutive backslash/newlines are not condensed." > > but I cannot reproduce it with this example makefile:
You don't specify what version of GNU Make you are using, but you are seeing a bug in GNU Make that was fixed in GNU Make 4.4: https://git.savannah.gnu.org/cgit/make.git/tree/NEWS?h=4.4.1#n226 > * Special targets like .POSIX are detected upon definition, ensuring that any > change in behavior takes effect immediately, before the next line is parsed. If you change your makefile to introduce a dummy statement between the .POSIX and the variable assignment, it will work correctly in GNU Make versions 4.0 and later: .POSIX: dummy = ... It won't work at all in older versions of GNU Make, which don't support this POSIX rule.