On Fri, May 3, 2013 at 9:20 PM, Eli Zaretskii <e...@gnu.org> wrote:

> You should use a backslash to produce a literal quote that should be
> passed to a program.  That's what the Microsoft startup code provides
> as the way to get quote characters into programs.
>

Thanks!  I thought I had tried that and failed, but it does seem to work.


> If you do know that cmd.exe will be invoked, you can either double the
> quotes, as the cmd.exe documentation describes, or us the ^ character
> to escape the quotes.
>

I cannot make that work, ^ does not seem to escape double quotes.


> Please show that use case, or something similar.  I don't immediately
> understand why recursive invocation means you'd need to quote a file
> name twice.  E.g., why not use this instead:
>
> SHELL=cmd.exe
> default:
>         $(MAKE) -f foo.mk x="a b"
>

The problem is that foo.mk will use $(x) directly in shell invocations.
Furthermore, foo.mk is provided by the user, and I don't want to ask my
users to worry about quoting. It is unnatural to use $(x) outside a shell
invocation in this case.

But these details are not so relevant, as \" indeed would solve this use
case.
_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
https://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to