diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2019-04-12 17:26:25 +0100 |
---|---|---|
committer | Dan Kegel <dank@kegel.com> | 2020-06-05 14:15:32 -0700 |
commit | 9cec5f3521407d50307eeef3c34cbd608949b0a1 (patch) | |
tree | 35ca77693d43648d3b423cd3ad3015adc88e6133 /mesonbuild/backend/backends.py | |
parent | 2f070c54bd415bbe2207fbd313c346d26f003215 (diff) | |
download | meson-9cec5f3521407d50307eeef3c34cbd608949b0a1.zip meson-9cec5f3521407d50307eeef3c34cbd608949b0a1.tar.gz meson-9cec5f3521407d50307eeef3c34cbd608949b0a1.tar.bz2 |
ninja: Push ninja and shell quoting down into NinjaRule
Rather than ad-hoc avoiding quoting where harmful, identify arguments
which contain shell constructs and ninja variables, and don't apply
quoting to those arguments.
This is made more complex by some arguments which might contain ninja
variables anywhere, not just at start, e.g. '/Fo$out'
(This implementation would fall down if there was an argument which
contained both a literal $ or shell metacharacter and a ninja variable,
but there are no instances of such a thing and it seems unlikely)
$DEPFILE needs special treatment. It's used in the special variable
depfile, so it's value can't be shell quoted (as it used as a filename
to read by ninja). So instead that variable needs to be shell quoted
when it appears in a command.
(Test common/129, which uses a depfile with a space in it's name,
exercises that)
If 'targetdep' is not in raw_names, test cases/rust all fail.
Diffstat (limited to 'mesonbuild/backend/backends.py')
0 files changed, 0 insertions, 0 deletions