Skip to contentSkip to conversation

Serialise some things in top-level Makefile

PATCH In review Ian Jackson 4 participants 6 messages Jul 7, 2010 – Jul 8, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Serialise some things in top-level Makefile

If the top-level Makefile does "make -C tools" before "make -C xen", or "make -C stubdom" before "make -C tools", things can go wrong.

This will also mean that "make dist-tools" should work, if only by virtue of building Xen first.

Makefile +2 -2
diff -r a0f0ae5be814 Makefile
@@ -66,7 +66,7 @@
 	$(MAKE) -C xen install
 
 .PHONY: install-tools
-install-tools: tools/ioemu-dir
+install-tools: tools/ioemu-dir install-xen
 	$(MAKE) -C tools install
 
 .PHONY: install-kernels
@@ -74,7 +74,7 @@
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir
+install-stubdom: tools/ioemu-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
#1 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · Ian Jackson

If the top-level Makefile does "make -C tools" before "make -C xen", or "make -C stubdom" before "make -C tools", things can go wrong.

This will also mean that "make dist-tools" should work, if only by virtue of building Xen first.

I disagree to a change like this, the more that I don't see why it would be needed: Building the tools independently and before the hypervisor used to work for me quite fine, and if it got broken recently I think this is what should get fixed.

One may be building hypervisor and tools (and perhaps also stubdom) with different settings, but that won't work anymore if a tools build implies a hypervisor one (unless one does a "make -C xen clean" first, thus having wasted the time it took to build the hypervisor a first time).

Jan

Quoted 26 lines

diff -r a0f0ae5be814 Makefile

Makefile +2 -2
@@ -66,7 +66,7 @@
 	$(MAKE) -C xen install
 
 .PHONY: install-tools
-install-tools: tools/ioemu-dir
+install-tools: tools/ioemu-dir install-xen
 	$(MAKE) -C tools install
 
 .PHONY: install-kernels
@@ -74,7 +74,7 @@
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir
+install-stubdom: tools/ioemu-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · Ian Jackson

If the top-level Makefile does "make -C tools" before "make -C xen", or "make -C stubdom" before "make -C tools", things can go wrong.

This will also mean that "make dist-tools" should work, if only by virtue of building Xen first.

Quoted 6 lines
Quoted 1 line

I disagree to a change like this, the more that I don't see why it would be needed: Building the tools independently and before the hypervisor used to work for me quite fine, and if it got broken recently I think this is what should get fixed.

Yes, that's always worked for me too. I can't see why there would now be a dependency between them.

-- Keir

#3 lore raw
In reply to Jan Beulich
Quoted 7 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · Ian Jackson

If the top-level Makefile does "make -C tools" before "make -C xen", or "make -C stubdom" before "make -C tools", things can go wrong.

This will also mean that "make dist-tools" should work, if only by virtue of building Xen first.

Quoted 6 lines
Quoted 1 line

I disagree to a change like this, the more that I don't see why it would be needed: Building the tools independently and before the hypervisor used to work for me quite fine, and if it got broken recently I think this is what should get fixed.

+1. I do most of my work with 32-bit tools and a 64-bit Xen; I definitely don't want to serialize my tools builds behind a useless 32-bit Xen build.

Cheers,

Tim.

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)
#4 lore raw

Tim Deegan writes ("Re: [Xen-devel] [PATCH] Serialise some things in top-level Makefile"):

Quoted 3 lines

+1. I do most of my work with 32-bit tools and a 64-bit Xen; I definitely don't want to serialize my tools builds behind a useless 32-bit Xen build.

You all seem to be right that "make tools" works without "make xen". I had a clear impression that the reverse was true. It doesn't seem to be any more.

"make stubdom" doesn't work on its own though. So how about this ?

Makefile: Serialise stubdom build after tools

Currently "make stubdom" on its own fails because it depends on files being installed by the results of "make tools". This also means that in some circumstances a parallel "make tools stubdom" (or "make all") can fail due to races. So make "make stubdom" depend on "make tools" having completed first.

Makefile +1 -1
diff -r a0f0ae5be814 Makefile
@@ -74,7 +74,7 @@
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir
+install-stubdom: tools/ioemu-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
#5 lore raw
Quoted 10 lines · Ian Jackson

Tim Deegan writes ("Re: [Xen-devel] [PATCH] Serialise some things in top-level Makefile"):

Quoted 3 lines

+1. I do most of my work with 32-bit tools and a 64-bit Xen; I definitely don't want to serialize my tools builds behind a useless 32-bit Xen build.

You all seem to be right that "make tools" works without "make xen". I had a clear impression that the reverse was true. It doesn't seem to be any more.

"make stubdom" doesn't work on its own though. So how about this ?

Looks good to me.

Tim.

Quoted 24 lines

Makefile: Serialise stubdom build after tools

Currently "make stubdom" on its own fails because it depends on files being installed by the results of "make tools". This also means that in some circumstances a parallel "make tools stubdom" (or "make all") can fail due to races. So make "make stubdom" depend on "make tools" having completed first.

diff -r a0f0ae5be814 Makefile

Makefile +1 -1
@@ -74,7 +74,7 @@
 	for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
 .PHONY: install-stubdom
-install-stubdom: tools/ioemu-dir
+install-stubdom: tools/ioemu-dir install-tools
 	$(MAKE) -C stubdom install
 ifeq (x86_64,$(XEN_TARGET_ARCH))
 	XEN_TARGET_ARCH=x86_32 $(MAKE) -C stubdom install-grub
Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)