chiark / gitweb /
Syntax: Expand &$( and &$NN to use ${ } rather than $( )
[secnet.git] / generate
index ffd3e5dfdb1e18951ac9771efef71c93e3e64143..f91cba8145134987c1191cea6660956ad67912b1 100755 (executable)
--- a/generate
+++ b/generate
@@ -234,8 +234,8 @@ sub process_input_mk ($$$$) {
     local $err_file=$f;
 
     my %srcdirmap = (
-                 '^' => "\$(top_srcdir)${dir_suffix}",
-                 '~' => "\$(top_srcdir)",
+                 '^' => "\${top_srcdir}${dir_suffix}",
+                 '~' => "\${top_srcdir}",
                    );
     my %pfxmap = (
                  ''  => $dir_prefix,
@@ -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 ';