Hi Junio,

On Thu, 9 Oct 2014, Junio C Hamano wrote:

> I didn't mean multiple uses of ?= for the same variable. I meant
> multiple uses of (references to) the variable. I.e. wouldn't FOO and
> BAR behave differently below?
> 
> FOO := $(shell random)
> BAR = $(shell random)
> all::
>    echo $(FOO) and $(BAR)
>    echo twice $(FOO) and $(BAR)

You're correct, of course, my mistake. I just tested with this:

        R ?= $(shell echo $$RANDOM)

        all:
                echo The values of $(R), $(R) and $(R)

and of course a "make" yields three different numbers. Sorry for missing
that.

So what we should do is something like

        ifeq ($(uname_S),)
                uname_S := $(shell uname -s)
        endif

even if repeating that pattern is kind of ugly...

Thanks for correcting my mistake,
Dscho
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to