[Top][All Lists]

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

Re: simple question about variables in a rule

From: Robert P. J. Day
Subject: Re: simple question about variables in a rule
Date: Sun, 16 May 2004 08:18:12 -0400 (EDT)

On Sun, 16 May 2004, David Boyce wrote:

> I believe that with sufficiently modern versions of GNU make you could also 
> make use of "target-specific variables", e.g.
> target: C = $A/$B

TMP = /tmp
mainpkg: BUILD_ROOT := ${TMP}/${PKG_NAME}
        ... rest of rule ...

which failed.  upon rereading, i then tried:

TMP = /tmp
mainpkg: BUILD_ROOT := ${TMP}/${PKG_NAME}
        ... rest of rule ...

(putting the target-specific variable definition on the previous line
before the actual rule definition), and this worked fine.

perhaps i'm just being pedantic, but there's nothing in section 6.10
on this issue that jumps off the page and screams, "these definitions
must be on a separate line!".  just an observation.

and this solves my problem nicely, thanks.


reply via email to

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