Received: from eggs.gnu.org ([2001:4830:134:3::10]:33486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wrT-0000K8-Mz for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:54:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9wrQ-0001Gf-D4 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:54:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9wrQ-0001GX-7X for qemu-devel@nongnu.org; Mon, 06 Jun 2016 11:54:40 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AD6158F514 for ; Mon, 6 Jun 2016 15:54:39 +0000 (UTC) From: Eduardo Habkost Date: Mon, 6 Jun 2016 12:53:54 -0300 Message-Id: <1465228434-20143-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH] docker: Don't use eval trick on Makefile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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