gnu.gcc.help
[Top] [All Lists]

Re: Basic question about access environment variable in makefile

Subject: Re: Basic question about access environment variable in makefile
From: Bill David
Date: Tue, 9 Sep 2008 06:21:34 -0700 PDT
Newsgroups: gnu.gcc.help

On Sep 9, 9:04 pm, Steve Turner <bbqbo...@xxxxxxxxxxxxxx> wrote:
>
> I don't know what any of this has to do with gcc, but...
>
> > I have tried (to environment variable XXX):
> > $XXX
> > $$XXX
> > $${XXX}
> > it always doesn't work.
>
> Because none are in the correct syntax.  Try $(XXX) or ${XXX}

Yes I have tried $(XXX) or ${XXX} before, but then I can see:
-I -I/include
in the command line.
It's so strange.

And it seems I am using:
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.

And in the gmake document, it also say we can use environment variable
like other variable in makefile. And it have given an example:
FOO = $PATH
all:
  @echo $(FOO)
  @echo $(value FOO)

<Prev in Thread] Current Thread [Next in Thread>