From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <famz@redhat.com>
Subject: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile
Date: Mon, 6 Jun 2016 12:53:54 -0300 [thread overview]
Message-ID: <1465228434-20143-1-git-send-email-ehabkost@redhat.com> (raw)
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
next reply other threads:[~2016-06-06 15:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 15:53 Eduardo Habkost [this message]
2016-06-07 3:24 ` [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile Fam Zheng
2016-06-07 14:00 ` Peter Maydell
2016-06-07 14:30 ` Peter Maydell
2016-06-08 0:03 ` Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465228434-20143-1-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).