From: Eduardo Habkost Date: Mon, 6 Jun 2016 15:53:54 +0000 (-0300) Subject: docker: Don't use eval trick on Makefile X-Git-Tag: v2.7.0-rc0~145 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5aebef884cabf197d51d2066a5beee8d0c721d4;p=thirdparty%2Fqemu.git docker: Don't use eval trick on Makefile 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 Signed-off-by: Peter Maydell --- diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 2fd2ca30571..134dc6fff40 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 $@