debuggers.hg

changeset 22466:de125ae8415d

Reapply 61c0c52a8c6c "qemu-xen: build adjustments"

The changeset
qemu-xen: build adjustments to support out-of-tree builds
works after all. Sorry for the noise.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Ian Jackson <Ian.Jackson@eu.citrix.com>
date Tue Nov 23 19:12:55 2010 +0000 (2010-11-23)
parents a4e3051f811b
children 91143941c492
files Config.mk stubdom/Makefile tools/Makefile
line diff
     1.1 --- a/Config.mk	Tue Nov 23 18:38:16 2010 +0000
     1.2 +++ b/Config.mk	Tue Nov 23 19:12:55 2010 +0000
     1.3 @@ -185,9 +185,9 @@ endif
     1.4  # CONFIG_QEMU ?= ../qemu-xen.git
     1.5  CONFIG_QEMU ?= $(QEMU_REMOTE)
     1.6  
     1.7 -QEMU_TAG ?= 60766b459c41e429a4b2405124b42512ea362984
     1.8 -# Fri Nov 19 18:50:43 2010 +0000
     1.9 -# passthrough: let xen choose the pirq number
    1.10 +QEMU_TAG ?= ad78ccc35617610bc43112788d28a05878fac91f
    1.11 +# Tue Nov 23 16:40:08 2010 +0000
    1.12 +# qemu-xen: build adjustments to support out-of-tree builds
    1.13  
    1.14  # Optional components
    1.15  XENSTAT_XENTOP     ?= y
     2.1 --- a/stubdom/Makefile	Tue Nov 23 18:38:16 2010 +0000
     2.2 +++ b/stubdom/Makefile	Tue Nov 23 19:12:55 2010 +0000
     2.3 @@ -215,6 +215,9 @@ cross-ocaml: $(OCAML_STAMPFILE)
     2.4  .PHONY: $(CROSS_ROOT)
     2.5  $(CROSS_ROOT): cross-newlib cross-zlib cross-libpci
     2.6  
     2.7 +QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
     2.8 +
     2.9 +ifeq ($(QEMU_ROOT),.)
    2.10  $(XEN_ROOT)/tools/ioemu-dir:
    2.11  	$(CROSS_MAKE) -C $(XEN_ROOT)/tools ioemu-dir-find
    2.12  
    2.13 @@ -231,6 +234,13 @@ ioemu/linkfarm.stamp: $(XEN_ROOT)/tools/
    2.14  			)) |							\
    2.15  	    while read f; do rm -f "$$f"; ln -s "$$src/$$f" "$$f"; done
    2.16  	touch ioemu/linkfarm.stamp
    2.17 +else
    2.18 +export QEMU_ROOT
    2.19 +
    2.20 +ioemu/linkfarm.stamp:
    2.21 +	mkdir -p ioemu
    2.22 +	touch ioemu/linkfarm.stamp
    2.23 +endif
    2.24  
    2.25  mk-headers-$(XEN_TARGET_ARCH): ioemu/linkfarm.stamp
    2.26  	mkdir -p include/xen && \
    2.27 @@ -287,8 +297,8 @@ ioemu: cross-zlib cross-libpci libxc
    2.28  	    TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
    2.29  	    TARGET_CFLAGS="$(TARGET_CFLAGS)" \
    2.30  	    TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
    2.31 -	    ./xen-setup-stubdom )
    2.32 -	$(CROSS_MAKE) -C ioemu
    2.33 +	    $(QEMU_ROOT)/xen-setup-stubdom )
    2.34 +	$(CROSS_MAKE) -C ioemu -f $(QEMU_ROOT)/Makefile
    2.35  
    2.36  ######
    2.37  # caml
     3.1 --- a/tools/Makefile	Tue Nov 23 18:38:16 2010 +0000
     3.2 +++ b/tools/Makefile	Tue Nov 23 19:12:55 2010 +0000
     3.3 @@ -81,20 +81,15 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TAR
     3.4  			 --interp-prefix=$(CROSS_SYS_ROOT)
     3.5  endif
     3.6  
     3.7 -ioemu/config-host.mak:
     3.8 -	cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
     3.9 -		--prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
    3.10 -
    3.11 -subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
    3.12 -
    3.13 -subdir-clean-ioemu:
    3.14 -	$(MAKE) -C ioemu distclean
    3.15 +QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
    3.16 +ifneq ($(QEMU_ROOT),.)
    3.17 +export QEMU_ROOT
    3.18 +endif
    3.19  
    3.20  ioemu-dir-find:
    3.21  	set -ex; \
    3.22  	if test -d $(CONFIG_QEMU); then \
    3.23 -		rm -f ioemu-dir; \
    3.24 -		ln -sf $(CONFIG_QEMU) ioemu-dir; \
    3.25 +		mkdir -p ioemu-dir; \
    3.26  	else \
    3.27  		if [ ! -d ioemu-remote ]; then \
    3.28  			rm -rf ioemu-remote ioemu-remote.tmp; \
    3.29 @@ -115,7 +110,7 @@ ioemu-dir-find:
    3.30  		$(absolutify_xen_root); \
    3.31  		$(buildmakevars2shellvars); \
    3.32  		cd ioemu-dir; \
    3.33 -		./xen-setup $(IOEMU_CONFIGURE_CROSS)
    3.34 +		$(QEMU_ROOT)/xen-setup $(IOEMU_CONFIGURE_CROSS)
    3.35  
    3.36  .PHONY: ioemu-dir-force-update
    3.37  ioemu-dir-force-update: