]> git.proxmox.com Git - mirror_qemu.git/commitdiff
docker: Don't use eval trick on Makefile
authorEduardo Habkost <ehabkost@redhat.com>
Mon, 6 Jun 2016 15:53:54 +0000 (12:53 -0300)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 7 Jun 2016 14:00:02 +0000 (15:00 +0100)
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>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tests/docker/Makefile.include

index 2fd2ca305716bc6670a260a8c11748413f2e31b9..134dc6fff406a0eacac780d1462be86065d8e33b 100644 (file)
@@ -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 $@