make question (environment variable)

"James" <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
A sample makefile
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?

Thanks.
James
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.