[Top][All Lists]

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

Re: make question (environment variable)

From: Henrik Carlqvist
Subject: Re: make question (environment variable)
Date: Wed, 14 Feb 2007 22:59:29 +0100
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

"James" <address@hidden> wrote:
> VAR=abc
> all:
>       echo $(VAR)
> In unix/bash, to override the variable defined in the makefile,
> make VAR=123
> works.
> However
> export VAR=123; make
> or
> VAR=123 make
> does not seem to work.
> Is there a way to override using export variable method?

You can allow environment variables to override an assignment by using the
following construction:

VAR ?= abc

regards Henrik
The address in the header is only to prevent spam. My real address is:
hc1(at) Examples of addresses which go to spammers:
address@hidden address@hidden

reply via email to

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