From 851f685993ce0d4c38fc27f128c033e8bcc6dd16 Mon Sep 17 00:00:00 2001 From: Michael Holzheu Date: Mon, 5 Nov 2018 15:58:26 +0100 Subject: [PATCH] Makefile: Add dependency between libvmcp and libutil to fix -j builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For linking the "libvmcp" example program the "libutil" is required. Therefore when the "libvmcp" directory is entered in a parallel build and the "libutil.a" file has not yet been created, a second "libutil" build is triggered which can then lead to build errors like the following: ar: libutil.a: File format not recognized ar: libutil.a: No such file or directory make[2]: Leaving directory '/builddir/build/BUILD/s390-tools-2.6.0/libutil' make[2]: *** [../common.mak:246: libutil.a] Error 1 make[1]: *** [../common.mak:246: libutil.a] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [../common.mak:315: ..//libutil/libutil.a] Error 2 make[1]: Leaving directory '/builddir/build/BUILD/s390-tools-2.6.0/libvmcp' make: *** [Makefile:57: libvmcp] Error 2 make: *** Waiting for unfinished jobs.... ving directory '/builddir/build/BUILD/s390-tools-2.6.0/libutil' make: *** [Makefile:57: libutil] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.wCulxB (%build) So fix this and add a dependency between libvmcp and libutil. Signed-off-by: Michael Holzheu Reviewed-by: Thomas Richter Signed-off-by: Jan Höppner --- common.mak | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common.mak b/common.mak index 1e8d8444..77095d74 100644 --- a/common.mak +++ b/common.mak @@ -343,6 +343,9 @@ $(rootdir)/libvmcp/libvmcp.a: $(rootdir)/libvmcp $(MAKE) -C $(rootdir)/libvmcp/ libvmcp.a .PHONY: $(rootdir)/libvmcp +# Dependencies between libraries +$(rootdir)/libvmcp: $(rootdir)/libutil/libutil.a + $(rootdir)/zipl/boot/data.o: $(MAKE) -C $(rootdir)/zipl/boot/ data.o