[Top][All Lists]

[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:01:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

On 06/06/2016 14:50, Eduardo Habkost wrote:
>   # Makes the definition constant after the first expansion
> docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
>   $(shell echo DEBUG: src_copy: $(DOCKER_SRC_COPY) >&2)
>       @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)

> 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.


reply via email to

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