Danek Duvall <danek.duv...@sun.com> writes:

> James C. McPherson wrote:
>
>> The answer is that while most people are using bldenv or nightly with
>> an appropriate env file, some (including myself) use "ws" or some other
>> method to set $SRC, $ROOT etc. Having the PRE_POUND etc in Makefile.master
>> makes sure that those people also see the benefit of the changes. I've
>> included a comment to this effect in Makefile.master.
>
> And the reason it's still in nightly and bldenv is so that folks who are
> using the new nightly and bldenv with older workspaces also benefit from
> having POUND_SIGN pre-defined in the environment?  Did you confirm that the
> shell wasn't called even in that case, like Rich said he thought it might?

It's actually James that pointed that out to me, From make(1S):

     Next, make imports variables from  the  environment  (unless
     the -e option is in effect), and treats them as defined mac-
     ros.  Because  make  uses  the  most  recent  definition  it
     encounters,  a  macro  definition  in  the makefile normally
     overrides an environment variable of the same name. When  -e
     is  in  effect,  however,  environment variables are read in
     after all makefiles  have  been  read.  In  that  case,  the
     environment  variables  take  precedence over definitions in
     the makefile.

A Makefile of the form:

     POUND_SIGN:sh= echo \\043 && touch /tmp/foo

     all:
             @echo POUND_SIGN "$(POUND_SIGN)"

Will create /tmp/foo in every case:

    dmake
    dmake -e
    POUND_SIGN="#" dmake
    POUND_SIGN="#" dmake -e

It's quite possible I'm being absolutely dense, but their presence in
bldenv and nightly appears to me to do absolutely nothing of value.

-- Rich
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to