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 2b8061b228bd95be5163dbe94cf5ddb1880c44be..d9b8cc24c0eaa32a421bfbe2f705f5646f253a4f 100644 (file)
--- a/README
+++ b/README
@@ -88,13 +88,13 @@ empty string).
 
 &=             =>      sub_dir                         or TOP
 
 
 &=             =>      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
 
 In general:
     ^   pathname of this subdirectory in source tree
index ffd3e5dfdb1e18951ac9771efef71c93e3e64143..f571fa19d196efc9aa62299a487a095f0dba2724 100755 (executable)
--- a/generate
+++ b/generate
@@ -234,8 +234,8 @@ sub process_input_mk ($$$$) {
     local $err_file=$f;
 
     my %srcdirmap = (
     local $err_file=$f;
 
     my %srcdirmap = (
-                 '^' => "\$(top_srcdir)${dir_suffix}",
-                 '~' => "\$(top_srcdir)",
+                 '^' => "\${top_srcdir}${dir_suffix}",
+                 '~' => "\${top_srcdir}",
                    );
     my %pfxmap = (
                  ''  => $dir_prefix,
                    );
     my %pfxmap = (
                  ''  => $dir_prefix,