[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja
From: |
Paolo Bonzini |
Subject: |
[PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja |
Date: |
Thu, 27 Aug 2020 12:59:56 -0400 |
From: Yonggang Luo <luoyonggang@gmail.com>
Even though SIMPLE_PATH_RE is used with re.match (which anchors the
match implictly to the beginning of the string) it also needs an
end-of-string anchor in order to match the full path token.
Otherwise, the match would succeed incorrectly for $ and : characters
contained in the path, for example if the path starts with C:/ or E:/.
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
scripts/ninjatool.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py
index c33eafb5a0..ba6bd9a2a6 100755
--- a/scripts/ninjatool.py
+++ b/scripts/ninjatool.py
@@ -55,7 +55,7 @@ else:
PATH_RE = r"[^$\s:|]+|\$[$ :]|\$[a-zA-Z0-9_-]+|\$\{[a-zA-Z0-9_.-]+\}"
-SIMPLE_PATH_RE = re.compile(r"[^$\s:|]+")
+SIMPLE_PATH_RE = re.compile(r"^[^$\s:|]+$")
IDENT_RE = re.compile(r"[a-zA-Z0-9_.-]+$")
STRING_RE = re.compile(r"(" + PATH_RE + r"|[\s:|])(?:\r?\n)?|.")
TOPLEVEL_RE = re.compile(r"([=:#]|\|\|?|^ +|(?:" + PATH_RE + r")+)\s*|.")
--
2.26.2
- [PULL 11/17] meson: cleanup xkbcommon detection, (continued)
- [PULL 11/17] meson: cleanup xkbcommon detection, Paolo Bonzini, 2020/08/27
- [PULL 06/17] meson: Fix chardev-baum.so name, Paolo Bonzini, 2020/08/27
- [PULL 05/17] meson: Fix meson build with --enable-libdaxctl, Paolo Bonzini, 2020/08/27
- [PULL 09/17] meson: skip SDL2 detection if --disable-system, Paolo Bonzini, 2020/08/27
- [PULL 16/17] meson: set colorout to auto, Paolo Bonzini, 2020/08/27
- [PULL 15/17] meson: Mingw64 gcc doesn't recognize system include_type for sdl2, Paolo Bonzini, 2020/08/27
- [PULL 13/17] ninjatool: quote dollars in variables, Paolo Bonzini, 2020/08/27
- [PULL 07/17] configure: default to PIE disabled on Windows platforms, Paolo Bonzini, 2020/08/27
- [PULL 14/17] meson: fix relpath failure on Win32, Paolo Bonzini, 2020/08/27
- [PULL 12/17] meson: don't require CONFIG_VTE for the GTK UI, Paolo Bonzini, 2020/08/27
- [PULL 17/17] ninjatool: Fixes E$$: in generated Makefile.ninja,
Paolo Bonzini <=
- Re: [PULL 00/17] Meson fixes for 2020-08-27, Peter Maydell, 2020/08/28