chiark / gitweb /
Syntax: Expand &$( and &$NN to use ${ } rather than $( )
[subdirmk.git] / generate
index f571fa1..f91cba8 100755 (executable)
--- a/generate
+++ b/generate
@@ -361,10 +361,10 @@ sub process_input_mk ($$$$) {
            elsif (s{^\$\-}{}) { $ddbl=undef; }
            elsif (s{^\$\+}{}) { $ddbl=1; }
            elsif (s{^\$\(}{}) {
-               ddbl_only($&); oud "\$(";
+               ddbl_only($&); oud "\${";
                $note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
            }
-           elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\$($1)"; }
+           elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\${$1}"; }
            elsif (s{^\$\{}{}) {
                err 'macro invocation cannot be re-$-doubled' if $ddbl;
                od '${eval ${call ';