make-w32
[Top][All Lists]
Advanced

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

Incorrect quoting of """" """" in master branch, with SHELL=cmd.exe


From: Erik Carstensen
Subject: Incorrect quoting of """" """" in master branch, with SHELL=cmd.exe
Date: Fri, 3 May 2013 17:17:20 +0200

When passing """" """" to a shell, it is evaluated to a single word " " if cmd.exe evaluates it, but  to an unquoted single space if make short-circuits the cmd.exe argument.

Test case:
foo.mk contains:
SHELL=cmd.exe
$(info x is $(x))
default:
    mkdir $(x)

Makefile contains:
SHELL=cmd.exe
default:
    $(MAKE) -f foo.mk x=a"""" """"b

With 3.82 (which lets cmd.exe handle the quotes), this yields:
x is a" "b
With master (which short-circuits it), it yields:
x is a
*** No rule to build target 'b'. Stop.

My actual use case is similar to the 'mkdir' invocation in foo.mk (a file with spaces needs to be quoted twice in order to be passed to commands in a recursive make). I have found sufficient workarounds for my use cases.


reply via email to

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