aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorGuillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>2017-05-02 16:48:30 -0400
committerGuillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>2017-05-02 16:54:13 -0400
commit253201d9bf1adb0e2cd55fb29dbbd22c3328ef32 (patch)
tree480a5c68ccf2654ca7632ff689cd81601ca145cf /mesonbuild/backend
parentce2e36fd6e6c6fa966ae5d1da72f0f3ef588dab4 (diff)
downloadmeson-253201d9bf1adb0e2cd55fb29dbbd22c3328ef32.zip
meson-253201d9bf1adb0e2cd55fb29dbbd22c3328ef32.tar.gz
meson-253201d9bf1adb0e2cd55fb29dbbd22c3328ef32.tar.bz2
ninjabackend: Add a set of raw names
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index d14ad6a..19adb2a 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -112,11 +112,12 @@ class NinjaBuildElement:
line = line.replace('\\', '/')
outfile.write(line)
+ # All the entries that should remain unquoted
+ raw_names = {'DEPFILE', 'DESC', 'pool', 'description'}
+
for e in self.elems:
(name, elems) = e
- should_quote = True
- if name == 'DEPFILE' or name == 'DESC' or name == 'pool' or name == 'description':
- should_quote = False
+ should_quote = name not in raw_names
line = ' %s = ' % name
q_templ = quote_char + "%s" + quote_char
noq_templ = "%s"