help-gnu-utils
[Top][All Lists]
Advanced

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

Re: Setting environment variables with Make


From: Ralf Wildenhues
Subject: Re: Setting environment variables with Make
Date: Sat, 7 Mar 2009 20:52:08 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello August,

* August Karlstrom wrote on Sat, Mar 07, 2009 at 02:19:06PM CET:
> I'm trying to store a value between two commands for a production rule  
> in a makefile. The following does not work though.
>
> foo:
>       bar=`output of some command`
>       echo $(bar)

Each command line in a rule is executed by a separate shell invocation.
So use e.g.,

foo:
        bar=`output of some command`; \
        echo $(bar)

Cheers,
Ralf




reply via email to

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