|
|
On Sep 9, 10:34 pm, Steve Turner <bbqbo...@xxxxxxxxxxxxxx> wrote:
> Bill David wrote:
> > 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)
>
> In Unix shells (such as what you're using on Linux) the presence of a
> variable in the environment doesn't mean that it's been exported for
> inheritance by all child programs. It isn't enough to say:
>
> FOO=value
>
> You must export that variable or child processes invoked by the shell
> where the variable was defined will not inherit that variable:
>
> export FOO=value
> or
> FOO=value
> export FOO
>
> --
> Free bad advice available here.
> To reply, eat the taco.
Yes, you are right.
I have made a silly mistake. I forget to export my environment
variable. :)
Thanks.
|
|