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
signature.asc
Description: PGP signature