qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing
Date: Mon, 6 Jun 2016 16:32:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


On 06/06/2016 16:15, Eduardo Habkost wrote:
>> > No, the second time you'll get the expansion of
>> > 
>> > DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
> And why it isn't enough to simply write the above line in the
> Makefile without any eval trick?

Because 1) initially the idea was to delay the $(mkdir) too 2) Too many
$(shell) end up slowing down make.

>>> > > Why did you use this trick instead of just relying on ":=" to
>>> > > expand the shell command only once?
>> > 
>> > I think initially the $(mkdir) was in DOCKER_SRC_COPY too.  Also, too
>> > many $(shell) end up slowing down make.
> And how exactly does the eval trick helps avoiding slowing down
> make, that wouldn't happen if using just:
>   DOCKER_SRC_COPY = docker-src.$(CUR_TIME)
> ?

If you define CUR_TIME with "=", the DOCKER_SRC_COPY value changes every
second.  If you define CUR_TIME with ":=", again you have a useless
$(shell).

In this particular case I agree that it's probably premature optimization.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]