ninjabackend: Add a set of raw names

pull/1717/head
Guillaume Poirier-Morency 8 years ago
parent ce2e36fd6e
commit 253201d9bf
  1. 7
      mesonbuild/backend/ninjabackend.py

@ -112,11 +112,12 @@ class NinjaBuildElement:
line = line.replace('\\', '/') line = line.replace('\\', '/')
outfile.write(line) outfile.write(line)
# All the entries that should remain unquoted
raw_names = {'DEPFILE', 'DESC', 'pool', 'description'}
for e in self.elems: for e in self.elems:
(name, elems) = e (name, elems) = e
should_quote = True should_quote = name not in raw_names
if name == 'DEPFILE' or name == 'DESC' or name == 'pool' or name == 'description':
should_quote = False
line = ' %s = ' % name line = ' %s = ' % name
q_templ = quote_char + "%s" + quote_char q_templ = quote_char + "%s" + quote_char
noq_templ = "%s" noq_templ = "%s"

Loading…
Cancel
Save