* [Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST
@ 2018-05-21 10:35 Alex Bennée
2018-05-23 8:34 ` Fam Zheng
0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2018-05-21 10:35 UTC (permalink / raw)
To: famz; +Cc: qemu-devel, Alex Bennée, Philippe Mathieu-Daudé
If the user doesn't specify a TARGET_LIST they get the current
configuration but with spaces and hilarity ensues. This adds some make
magic to turn the TARGET_LIST back into a comma separated list.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- use common $(SPACE) and $(COMMA) in rules.mak
---
rules.mak | 3 +++
tests/docker/Makefile.include | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/rules.mak b/rules.mak
index 04c7f74d07..bbb2667928 100644
--- a/rules.mak
+++ b/rules.mak
@@ -1,4 +1,7 @@
+# These are used when we want to do substitutions without confusing Make
+NULL :=
+SPACE := $(NULL) #
COMMA := ,
# Don't use implicit rules or variables
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index d00887bdf1..e911d44d9f 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -148,7 +148,7 @@ docker-run: docker-qemu-src
$(if $V,,--rm) \
$(if $(DEBUG),-ti,) \
$(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
- -e TARGET_LIST=$(TARGET_LIST) \
+ -e TARGET_LIST=$(subst $(SPACE),$(COMMA),$(TARGET_LIST)) \
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
-e V=$V -e J=$J -e DEBUG=$(DEBUG) \
-e SHOW_ENV=$(SHOW_ENV) \
--
2.17.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST
2018-05-21 10:35 [Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST Alex Bennée
@ 2018-05-23 8:34 ` Fam Zheng
0 siblings, 0 replies; 2+ messages in thread
From: Fam Zheng @ 2018-05-23 8:34 UTC (permalink / raw)
To: Alex Bennée; +Cc: qemu-devel, Philippe Mathieu-Daudé
On Mon, 05/21 11:35, Alex Bennée wrote:
> If the user doesn't specify a TARGET_LIST they get the current
> configuration but with spaces and hilarity ensues. This adds some make
> magic to turn the TARGET_LIST back into a comma separated list.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Queued, thanks!
Fam
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-23 8:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-21 10:35 [Qemu-devel] [PATCH v2] tests/docker/Makefile.include: handle empty TARGET_LIST Alex Bennée
2018-05-23 8:34 ` Fam Zheng
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).