Printing dollar from literals and variables To survive the parser, a dollar character must be doubled. 1 dollar literal => <single-quote-var-value> 1 dollar literal eol => <> 2 dollar literal => <$> 4 dollar literal => <$$> Some hungry part of make eats all the dollars after a :U modifier. 1 dollar default => <> 2 dollar default => <> 4 dollar default => <> This works as expected. 1 dollar variable => <> 2 dollar variable => <$> 4 dollar variable => <$$> Some hungry part of make eats all the dollars after a :U modifier. 1 dollar var-default => <> 2 dollar var-default => <$> 4 dollar var-default => <$$> Dollar in :S pattern S,$,word, => <$XYword> S,$X,word, => <$XY> S,$$X,word, => <$XY> S,$$$X,word, => <$XY> S,$X,replaced, => <replaced> S,$$X,replaced, => <replaced> S,$$$X,replaced, => <replaced> Dollar in :C character class The A is replaced because the $$ is reduced to a single $, which is then resolved to the variable X with the value VAR_X. The effective character class becomes [VAR_XY]. C,[$$XY],<&>,g => <$<A><X><Y>> Dollar in :C pattern For some reason, multiple dollars are folded into one. C,$,dollar,g => <> C,$$,dollar,g => <> Dollar in :S replacement For some reason, multiple dollars are folded into one. S,word,a$Xo, => <aVAR_Xo> S,word,a$$Xo, => <aVAR_Xo> S,word,a$$$Xo, => <aVAR_Xo> exit status 0 |