bug-automake
[Top][All Lists]
Advanced

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

bug#7610: [PATCH] automake: support embedded \# in variable appends


From: Mike Frysinger
Subject: bug#7610: [PATCH] automake: support embedded \# in variable appends
Date: Sun, 20 Feb 2022 19:20:41 -0500

On 20 Feb 2022 15:25, Karl Berry wrote:
>     Use of \# is not portable.
> 
> Is there any known make implementation which does not preserve the #?
> 
>       foo = blah\#blah
>       foo += what
>       -> warning: escaping \# comment markers is not portable
>       -> foo = blah\#blah what
> 
> Assuming there is in fact variability in behavior in practice, sounds
> fine. --thanks, karl.

at least POSIX has this to say:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html#tag_20_76_16
> Because of widespread historical practice, interpreting a <number-sign> ( '#' 
> )
> inside a variable as the start of a comment has the unfortunate side-effect of
> making it impossible to place a <number-sign> in a variable, thus forbidding
> something like:
> 
> CFLAGS = "-D COMMENT_CHAR='#'"

from this specific bug report, Stefano mentioned Solaris 10 make preserves both
the \ and the #.
-mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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