qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR
Date: Tue, 26 May 2015 15:29:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0


On 26/05/2015 07:38, Peter Crosthwaite wrote:
> make can be invoked in the individual build dirs to build an individual
> target or just a single file of a target. e.g.
> 
> touch translate-all.c
> make -C microblazeel-softmmu translate-all.o

Out of curiosity, why not use "make subdir-microblazeel-softmmu" instead?

Paolo

> There is however a small bug when using the pixman submodule.
> config-host.mak will ref BUILD_DIR for the pixman -I CFLAGS:
> 
> grep BUILD_DIR config-host.mak
> QEMU_CFLAGS=-I$(SRC_PATH)/pixman/pixman -I$(BUILD_DIR)/pixman/pixman ...
> 
> This causes a build failure as -I/pixman/pixman (BUILD_DIR=="") will
> not be found.
> 
> BUILD_DIR is usually set by the top level Makefile. Just lazy-set it in
> Makefile.target to the parent directory.
> 
> Granted, this will not work if the pixman submodule is not prebuilt,
> but it at least means you can do incremental partial builds once you
> have done your initial full build (or attempt) from the top level.
> 
> The next step would be refactor make infrastructure to rebuild pixman
> on a submake like the one above.
> 
> Cc: Gerd Hoffmann <address@hidden>
> Signed-off-by: Peter Crosthwaite <address@hidden>
> ---
> Pixman is the only config-host.mak user of BUILD dir so maybe there is
> a pixman specific solution out there too?
> ---
>  Makefile.target | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Makefile.target b/Makefile.target
> index 3e861c8..ec5b92c 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -1,5 +1,7 @@
>  # -*- Mode: makefile -*-
>  
> +BUILD_DIR?=$(CURDIR)/..
> +
>  include ../config-host.mak
>  include config-target.mak
>  include config-devices.mak
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]