qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/4] meson: Fixes the ninjatool issue that E$$: are generated


From: Mark Cave-Ayland
Subject: Re: [PATCH 1/4] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja
Date: Tue, 25 Aug 2020 22:26:18 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 25/08/2020 17:53, luoyonggang@gmail.com wrote:

> From: Yonggang Luo <luoyonggang@gmail.com>
> 
> SIMPLE_PATH_RE should match the full path token.
> Or the $ and : contained in path would not matched if the path are start with 
> C:/ and E:/
> ---
>  scripts/ninjatool.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py
> index cc77d51aa8..6ca8be6f10 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*|.")

I've tested this and it changes build.ninja so instead of Windows paths 
beginning C$$
they now begin C$ instead e.g.:

build qemu-version.h: CUSTOM_COMMAND  |
C$:/msys64/home/Mark/qemu/scripts/qemu-version.sh PHONY

I was expecting this not to work, however it seems in the next stage of
transformation from build.ninja to Makefile.ninja the extra $ is removed 
correctly:

qemu-version.h: qemu-version.h.stamp; @:
qemu-version.h.stamp: C:/msys64/home/Mark/qemu/scripts/qemu-version.sh PHONY | ;
${ninja-command-restat}

It feels like the extra $ shouldn't be present in build.ninja, but the patch 
does
generate a Makefile.ninja that works.


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]