Re: make question (environment variable)
Henrik Carlqvist <[email protected]>
| Newsgroups | gmane.comp.gnu.utils |
|---|---|
| Organization | SunSITE.dk - Supporting Open source |
| Message-ID | <[email protected]> |
"James" <[email protected]> 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)poolhem.se Examples of addresses which go to spammers: root@localhost postmaster@localhost