[Top][All Lists]

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

Re: whitespaces preceding backslash sometimes removed in POSIX mode

From: Paul Smith
Subject: Re: whitespaces preceding backslash sometimes removed in POSIX mode
Date: Mon, 06 Mar 2023 09:46:01 -0500
User-agent: Evolution 3.46.4 (by Flathub.org)

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:


> * 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:

  dummy =

It won't work at all in older versions of GNU Make, which don't support
this POSIX rule.

reply via email to

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