This makes it possible to use in $-doubled shell runes as well as in
make syntax.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
&\$ => $ provided for $-doubling regimes
&\NEWLINE eats the newline and vanishes
&\$ => $ provided for $-doubling regimes
&\NEWLINE eats the newline and vanishes
-&$VARIABLE => $(sub_dir_VARIABLE) or $(TOP_VARIABLE)
+&$VARIABLE => ${sub_dir_VARIABLE} or ${TOP_VARIABLE}
VARIABLE is ASCII starting with a letter and matching \w+
& thing thing... &
VARIABLE is ASCII starting with a letter and matching \w+
& thing thing... &
interpret this as $(F)BAR. It's normally better to write
it this way, at least if the variable expansion is followed
by more letters. Note that &$FOO works differently to
interpret this as $(F)BAR. It's normally better to write
it this way, at least if the variable expansion is followed
by more letters. Note that &$FOO works differently to
- raw make: it expands to $(sub_dir_FOO).
+ raw make: it expands to ${sub_dir_FOO}.
broken-var-ref
An attempt at variable expansion looking like $&...
broken-var-ref
An attempt at variable expansion looking like $&...
elsif (m{^(?=$caps_re)}) { od $var_prefix }
elsif (s{^\$([A-Za-z]\w+)}{}) {
$note_varref->($1,1);
elsif (m{^(?=$caps_re)}) { od $var_prefix }
elsif (s{^\$([A-Za-z]\w+)}{}) {
$note_varref->($1,1);
- od "\$(${var_prefix}$1)";
+ od "\${${var_prefix}$1}";
}
elsif (s{^([~^]?)(?=$lc_re)}{}) { od $pfxmap{$1} }
elsif (s{^_}{}) { od $var_prefix }
}
elsif (s{^([~^]?)(?=$lc_re)}{}) { od $pfxmap{$1} }
elsif (s{^_}{}) { od $var_prefix }
# $WARN
# $(WARN)
# $(TOP_WARN)
# $WARN
# $(WARN)
# $(TOP_WARN)
-# $(TOP_NOWARN1) $(NOWARN1)
-# $(TOP_NOWARN2) $(NOWARN2)
+# ${TOP_NOWARN1} $(NOWARN1)
+# ${TOP_NOWARN2} $(NOWARN2)
${eval ${call some-macro, 42, $$x, { $(foreach something) } }}
${eval ${call some-macro, 42, $$x, { $(foreach something) } }}