[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing |
Date: |
Mon, 6 Jun 2016 12:02:18 -0300 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Mon, Jun 06, 2016 at 04:32:50PM +0200, Paolo Bonzini wrote:
> 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.
Now I see: you wanted to delay the shell command, but evaluate it
only once.
But I don't see why it makes sense here, because the variable is
being expanded immediately after it is defined (in the
"$(DOCKER_SRC_COPY):" line), and CUR_TIME is already defined
using ":=".
>
> >>> > > 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)
> > ?
Oops, I mean:
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).
Why a useless shell?
>
> In this particular case I agree that it's probably premature optimization.
In this particular case it doesn't seem to be an optimization at
all.
--
Eduardo
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, (continued)
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Fam Zheng, 2016/06/02
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/03
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/03
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Fam Zheng, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Paolo Bonzini, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Paolo Bonzini, 2016/06/06
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing,
Eduardo Habkost <=
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Paolo Bonzini, 2016/06/06
[Qemu-devel] [PULL 05/16] docker: Add images, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 02/16] rules.mak: Add "COMMA" constant, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 09/16] docker: Add full test, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 07/16] docker: Add common.rc, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 10/16] docker: Add clang test, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 08/16] docker: Add quick test, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 06/16] docker: Add test runner, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 12/16] docker: Add travis tool, Fam Zheng, 2016/06/01
[Qemu-devel] [PULL 13/16] docs: Add text for tests/docker in build-system.txt, Fam Zheng, 2016/06/01