[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 11:15:28 -0300 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Mon, Jun 06, 2016 at 04:01:53PM +0200, Paolo Bonzini wrote:
>
>
> On 06/06/2016 14:50, Eduardo Habkost wrote:
> > # Makes the definition constant after the first expansion
> > DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY :=
> > docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
> >
> > $(shell echo DEBUG: src_copy: $(DOCKER_SRC_COPY) >&2)
> >
> > $(DOCKER_SRC_COPY):
> > @mkdir $@
> > $(call make-archive-maybe, $(SRC_PATH), $@/qemu.tgz)
> >
> > and I still get a failure:
> > https://travis-ci.org/ehabkost/qemu/jobs/135574871
> >
> > $ make -j3 && ${TEST_CMD}
> > DEBUG: cur_time: 2016.13278
> > /home/travis/build/ehabkost/qemu/tests/docker/Makefile.include:37: ***
> > unterminated variable reference. Stop.
> >
> > I am very confused by that code: using "=" to make a variable
> > reference itself is not allowed, but in this case no error is
> > reported because of the $(eval) trick. I have no idea what will
> > happen the second time the variable is expanded. Isn't $(eval)
> > going to be expanded again?
>
> 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?
>
> > 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)
?
--
Eduardo
- [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, (continued)
- [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Fam Zheng, 2016/06/01
- Re: [Qemu-devel] [PULL 04/16] Makefile: Rules for docker testing, Eduardo Habkost, 2016/06/02
- 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 <=
- 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
[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