help-make
[Top][All Lists]
Advanced

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

Re: $(file ...) function and other tools writing to the same file


From: Martin Reinders
Subject: Re: $(file ...) function and other tools writing to the same file
Date: Mon, 14 Mar 2016 15:55:28 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 14.03.16 14:56, Tim Murphy wrote:
> Functions and variables are expanded before the command and list of
> variables is sent to the shell to be executed.  Hence $(file) happens
> before your echo command is executed.

That makes sense now, thank you very much.

> Why would you use $(file) in a commandline anyhow?

Well, my idea was to use $(file) as a replacement for the "echo" command
in a Makefile which is used both on Unix and Windows, since the
escaping/quoting rules are a bit different between those platforms.

Your and Paul's feedback helped a lot to understand the problem, and I
will now probably refrain from using $(file) for _that_ purpose.

Thanks again,
Martin



reply via email to

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