[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Variable assignment that depends on a generated target
From: |
Dave Korn |
Subject: |
RE: Variable assignment that depends on a generated target |
Date: |
Wed, 25 Apr 2007 00:42:09 +0100 |
On 25 April 2007 00:18, David Wuertele wrote:
> I have a variable named VERSION that is set thusly:
>
> VERSION := $(shell grep VERSION /path/to/some/file)
>
> The problem is that /path/to/some/file is a target that is generated after
> the VERSION is assigned.
>
> I would like to force /path/to/some/file to get generated before VERSION is
> assigned. Is there a way to specify that?
Use deferred assignment
VERSION = $(shell grep VERSION /path/to/some/file)
and don't refer to it in any target that gets built earlier than
/path/to/some/file?
cheers,
DaveK
--
Can't think of a witty .sigline today....