chiark / gitweb /
Syntax: Use ${top_srcdir} rather than $(top_srcdir)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 14:13:52 +0000 (14:13 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 11:35:16 +0000 (11:35 +0000)
Again, this makes it possible to use in $-doubled shell runes as well
as in make syntax.  (Assuming you have made top_srcdir be a shell
variable as well as a make variable.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
README
generate

diff --git a/README b/README
index 2b8061b..d9b8cc2 100644 (file)
--- a/README
+++ b/README
@@ -88,13 +88,13 @@ empty string).
 
 &=             =>      sub_dir                         or TOP
 
-&^lc           =>      $(top_srcdir)/sub/dir/lc
-&^/            =>      $(top_srcdir)/sub/dir/
-&^.            =>      $(top_srcdir)/sub/dir
+&^lc           =>      ${top_srcdir}/sub/dir/lc
+&^/            =>      ${top_srcdir}/sub/dir/
+&^.            =>      ${top_srcdir}/sub/dir
 
-&~lc           =>      $(top_srcdir)/lc
-&~/            =>      $(top_srcdir)/
-&~.            =>      $(top_srcdir)
+&~lc           =>      ${top_srcdir}/lc
+&~/            =>      ${top_srcdir}/
+&~.            =>      ${top_srcdir}
 
 In general:
     ^   pathname of this subdirectory in source tree
index ffd3e5d..f571fa1 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,