* [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
@ 2016-06-06 15:53 Eduardo Habkost
2016-06-07 3:24 ` Fam Zheng
0 siblings, 1 reply; 5+ messages in thread
From: Eduardo Habkost @ 2016-06-06 15:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Fam Zheng
The eval trick for defining DOCKER_SRC_COPY doesn't do anything
useful, as DOCKER_SRC_COPY is immediately expanded just after it
is defined, and CUR_TIME is already defined using ":=". Simply
define it using ":=" so it is evaluated only once.
The eval trick was also triggering an weird error on Travis builds:
qemu/tests/docker/Makefile.include:34: *** unterminated variable reference. Stop.
The issue is not easily reproducible (maybe it's a bug in some
versions of Make), but it is avoided if removing the eval trick.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
tests/docker/Makefile.include | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 2fd2ca3..134dc6f 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -28,8 +28,7 @@ make-archive-maybe = $(if $(wildcard $1/*), \
" ARCHIVE $(notdir $2)"))
CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
-# Makes the definition constant after the first expansion
-DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
+DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
$(DOCKER_SRC_COPY):
@mkdir $@
--
2.5.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
2016-06-06 15:53 [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile Eduardo Habkost
@ 2016-06-07 3:24 ` Fam Zheng
2016-06-07 14:00 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Fam Zheng @ 2016-06-07 3:24 UTC (permalink / raw)
To: Eduardo Habkost; +Cc: qemu-devel, Paolo Bonzini
On Mon, 06/06 12:53, Eduardo Habkost wrote:
> The eval trick for defining DOCKER_SRC_COPY doesn't do anything
> useful, as DOCKER_SRC_COPY is immediately expanded just after it
> is defined, and CUR_TIME is already defined using ":=". Simply
> define it using ":=" so it is evaluated only once.
>
> The eval trick was also triggering an weird error on Travis builds:
> qemu/tests/docker/Makefile.include:34: *** unterminated variable reference. Stop.
>
> The issue is not easily reproducible (maybe it's a bug in some
> versions of Make), but it is avoided if removing the eval trick.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> tests/docker/Makefile.include | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 2fd2ca3..134dc6f 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -28,8 +28,7 @@ make-archive-maybe = $(if $(wildcard $1/*), \
> " ARCHIVE $(notdir $2)"))
>
> CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
> -# Makes the definition constant after the first expansion
> -DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
> +DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
>
> $(DOCKER_SRC_COPY):
> @mkdir $@
> --
> 2.5.5
>
Applied, thanks.
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
2016-06-07 3:24 ` Fam Zheng
@ 2016-06-07 14:00 ` Peter Maydell
2016-06-07 14:30 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2016-06-07 14:00 UTC (permalink / raw)
To: Fam Zheng; +Cc: Eduardo Habkost, Paolo Bonzini, QEMU Developers
On 7 June 2016 at 04:24, Fam Zheng <famz@redhat.com> wrote:
> On Mon, 06/06 12:53, Eduardo Habkost wrote:
>> The eval trick for defining DOCKER_SRC_COPY doesn't do anything
>> useful, as DOCKER_SRC_COPY is immediately expanded just after it
>> is defined, and CUR_TIME is already defined using ":=". Simply
>> define it using ":=" so it is evaluated only once.
>>
>> The eval trick was also triggering an weird error on Travis builds:
>> qemu/tests/docker/Makefile.include:34: *** unterminated variable reference. Stop.
>>
>> The issue is not easily reproducible (maybe it's a bug in some
>> versions of Make), but it is avoided if removing the eval trick.
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>> tests/docker/Makefile.include | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 2fd2ca3..134dc6f 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -28,8 +28,7 @@ make-archive-maybe = $(if $(wildcard $1/*), \
>> " ARCHIVE $(notdir $2)"))
>>
>> CUR_TIME := $(shell date +%Y-%m-%d-%H.%M.%S.$$$$)
>> -# Makes the definition constant after the first expansion
>> -DOCKER_SRC_COPY = $(eval DOCKER_SRC_COPY := docker-src.$(CUR_TIME))$(DOCKER_SRC_COPY)
>> +DOCKER_SRC_COPY := docker-src.$(CUR_TIME)
>>
>> $(DOCKER_SRC_COPY):
>> @mkdir $@
>> --
>> 2.5.5
>>
>
> Applied, thanks.
Hi; I'd like to apply this direct to master, because one of my build
test machines hits this error intermittently, and so without the fix
I can't reliably process any other pull requests.
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
2016-06-07 14:00 ` Peter Maydell
@ 2016-06-07 14:30 ` Peter Maydell
2016-06-08 0:03 ` Fam Zheng
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2016-06-07 14:30 UTC (permalink / raw)
To: Fam Zheng; +Cc: Eduardo Habkost, Paolo Bonzini, QEMU Developers
On 7 June 2016 at 15:00, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 7 June 2016 at 04:24, Fam Zheng <famz@redhat.com> wrote:
>> On Mon, 06/06 12:53, Eduardo Habkost wrote:
>>> The eval trick for defining DOCKER_SRC_COPY doesn't do anything
>>> useful, as DOCKER_SRC_COPY is immediately expanded just after it
>>> is defined, and CUR_TIME is already defined using ":=". Simply
>>> define it using ":=" so it is evaluated only once.
>>>
>>> The eval trick was also triggering an weird error on Travis builds:
>>> qemu/tests/docker/Makefile.include:34: *** unterminated variable reference. Stop.
>>>
>>> The issue is not easily reproducible (maybe it's a bug in some
>>> versions of Make), but it is avoided if removing the eval trick.
> Hi; I'd like to apply this direct to master, because one of my build
> test machines hits this error intermittently, and so without the fix
> I can't reliably process any other pull requests.
Now applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
2016-06-07 14:30 ` Peter Maydell
@ 2016-06-08 0:03 ` Fam Zheng
0 siblings, 0 replies; 5+ messages in thread
From: Fam Zheng @ 2016-06-08 0:03 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, Eduardo Habkost, QEMU Developers
On Tue, 06/07 15:30, Peter Maydell wrote:
> On 7 June 2016 at 15:00, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 7 June 2016 at 04:24, Fam Zheng <famz@redhat.com> wrote:
> >> On Mon, 06/06 12:53, Eduardo Habkost wrote:
> >>> The eval trick for defining DOCKER_SRC_COPY doesn't do anything
> >>> useful, as DOCKER_SRC_COPY is immediately expanded just after it
> >>> is defined, and CUR_TIME is already defined using ":=". Simply
> >>> define it using ":=" so it is evaluated only once.
> >>>
> >>> The eval trick was also triggering an weird error on Travis builds:
> >>> qemu/tests/docker/Makefile.include:34: *** unterminated variable reference. Stop.
> >>>
> >>> The issue is not easily reproducible (maybe it's a bug in some
> >>> versions of Make), but it is avoided if removing the eval trick.
>
> > Hi; I'd like to apply this direct to master, because one of my build
> > test machines hits this error intermittently, and so without the fix
> > I can't reliably process any other pull requests.
>
> Now applied, thanks.
No problem, sorry for the trouble!
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-08 0:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 15:53 [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile Eduardo Habkost
2016-06-07 3:24 ` Fam Zheng
2016-06-07 14:00 ` Peter Maydell
2016-06-07 14:30 ` Peter Maydell
2016-06-08 0:03 ` Fam Zheng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.