qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] testing: don't nest build for fp-test
@ 2020-01-07 18:00 Alex Bennée
  2020-01-09  6:18 ` Emilio G. Cota
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Bennée @ 2020-01-07 18:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, cota, Alex Bennée, Aurelien Jarno

Re-calling the main make is counter-productive and really messes up
with parallel builds. Just ensure we have built the pre-requisites
before we build the fp-test bits. If the user builds manually just
complain if the parent build hasn't got the bits we need.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/Makefile.include |  2 +-
 tests/fp/Makefile      | 14 ++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 49e3b0d3194..7a767bf1148 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -969,7 +969,7 @@ FP_TEST_BIN=$(BUILD_DIR)/tests/fp/fp-test
 
 # the build dir is created by configure
 .PHONY: $(FP_TEST_BIN)
-$(FP_TEST_BIN):
+$(FP_TEST_BIN): config-host.h $(test-util-obj-y)
 	$(call quiet-command, \
 	 	$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" $(notdir $@), \
 	         "BUILD", "$(notdir $@)")
diff --git a/tests/fp/Makefile b/tests/fp/Makefile
index 5a35e7c2109..56768ecfd2f 100644
--- a/tests/fp/Makefile
+++ b/tests/fp/Makefile
@@ -554,15 +554,13 @@ TF_OBJS_LIB += $(TF_OBJS_TEST)
 
 BINARIES := fp-test$(EXESUF) fp-bench$(EXESUF)
 
-# everything depends on config-host.h because platform.h includes it
-all: $(BUILD_DIR)/config-host.h
-	$(MAKE) $(BINARIES)
+# We require artefacts from the main build including config-host.h
+# because platform.h includes it. Rather than re-invoking the main
+# build we just error out if things aren't there.
+$(LIBQEMUUTIL) $(BUILD_DIR)/config-host.h:
+	$(error $@ missing, re-run parent build)
 
-$(LIBQEMUUTIL):
-	$(MAKE) -C $(BUILD_DIR) libqemuutil.a
-
-$(BUILD_DIR)/config-host.h:
-	$(MAKE) -C $(BUILD_DIR) config-host.h
+all: $(BUILD_DIR)/config-host.h $(BINARIES)
 
 # libtestfloat.a depends on libsoftfloat.a, so specify it first
 FP_TEST_LIBS := libtestfloat.a libsoftfloat.a $(LIBQEMUUTIL)
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] testing: don't nest build for fp-test
  2020-01-07 18:00 [PATCH] testing: don't nest build for fp-test Alex Bennée
@ 2020-01-09  6:18 ` Emilio G. Cota
  0 siblings, 0 replies; 2+ messages in thread
From: Emilio G. Cota @ 2020-01-09  6:18 UTC (permalink / raw)
  To: Alex Bennée; +Cc: Peter Maydell, qemu-devel, Aurelien Jarno

On Tue, Jan 07, 2020 at 18:00:03 +0000, Alex Bennée wrote:
> Re-calling the main make is counter-productive and really messes up
> with parallel builds. Just ensure we have built the pre-requisites
> before we build the fp-test bits. If the user builds manually just
> complain if the parent build hasn't got the bits we need.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Reviewed-by: Emilio G. Cota <cota@braap.org>

		E.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-09  6:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 18:00 [PATCH] testing: don't nest build for fp-test Alex Bennée
2020-01-09  6:18 ` Emilio G. Cota

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).