aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-08-26 17:02:03 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-08-27 18:52:30 +0200
commit1a4db552d8ee7efe9202f712de874e52900a5915 (patch)
treee2315c4c375cac786847b91e5d9c9d015fd3c49d /scripts
parentec14f888b875943cceefda214eeed27c6c6440a6 (diff)
ninjatool: quote dollars in variables
Otherwise, dollars (such as in the special $ORIGIN rpath) are eaten by Make. Reported-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ninjatool.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py
index cc77d51aa8..c33eafb5a0 100755
--- a/scripts/ninjatool.py
+++ b/scripts/ninjatool.py
@@ -834,7 +834,8 @@ class Ninja2Make(NinjaParserEventsWithVars):
self.print()
for targets in self.build_vars:
for name, value in self.build_vars[targets].items():
- self.print('%s: private .var.%s := %s' % (targets, name, value))
+ self.print('%s: private .var.%s := %s' %
+ (targets, name, value.replace('$', '$$')))
self.print()
if not self.seen_default:
default_targets = sorted(self.all_outs - self.all_ins, key=natural_sort_key)