]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
build system: make install-stubdom depend on install-tools again
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 15 Apr 2019 16:13:09 +0000 (17:13 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 23 Apr 2019 16:00:08 +0000 (17:00 +0100)
In d290e325179ccee966cd679d0fed48be6f4cc1b7
  "build system: don't let install-stubdom depend on install-tools"
the dependency of install-stubdom on install-tools was removed.

However, this was not correct.   stubdom/Makefile contains this:

  $(XEN_ROOT)/tools/qemu-xen-traditional-dir:
       $(MAKE) DESTDIR= -C $(XEN_ROOT)/tools qemu-xen-traditional-dir-find

As I have written before:

  With recursive make, it is necessary for the overall structure of the
  makefiles to sequence things so that each directory is entered exactly
  once, before its dependent directories are entered.  (It is possible
  to violate this rule without creating races but it is tricky and
  inadvisable.)

Since d290e325179c, it can happen that the command for the
qemu-xen-traditional-dir-find rule is run twice simultaneously - once
as a result of $(MAKE) -C tools install, and once as a result of
$(MAKE) -C stubdom install.  If you get unlucky, this causes lossage.
(This just happened to me in an osstest flight.)

In principle we could alternatively fix this by lifting the commands
in the qemu-xen-traditional-dir-find target (and perhaps other things
too) into the toplevel Makefile, as was done for mini-os.

But that seems overkill given how bad the stubdom build system is, and
the fact that we think at some point this qemu-trad will go away
entirely.  Adding the tools dependency back to the stubdom build is
by and large good enough.

(Someone who really wants to build stubdom without tools is welcome to
do this separation if they really want to.)

CC: Juergen Gross <jgross@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Makefile

index d959cd5b473757478b8f16dbf1e567464856d1e5..829ac63741620f1c772b8b9825f02a67954c48e1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@ install-tools: install-tools-public-headers
        $(MAKE) -C tools install
 
 .PHONY: install-stubdom
-install-stubdom: mini-os-dir install-tools-public-headers
+install-stubdom: mini-os-dir install-tools
        $(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
        XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub