[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: commands executed out of order
From: |
Dave Korn |
Subject: |
RE: commands executed out of order |
Date: |
Wed, 22 Aug 2007 16:47:01 +0100 |
On 22 August 2007 16:35, cbrown wrote:
> I have encountered something funny with a rule like this;
>
> meta-project.site:
> mkdir test-reports
> $(shell cp somefile.info test-reports/app.info)
>
> When this runs, I see this;
>
> cp: cannot create regular file `app.info': No such file or directory
> mkdir -p sbs/target/debug/test-reports
>
> I fixed the issue by removing the $(shell construct and just doing
> the cp, but still; Why do the original commands execute out of order?
Because $(shell ...) isn't a command. All variables (and functions) get
expanded before the commands are run.
cheers,
DaveK
--
Can't think of a witty .sigline today....