qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>, qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR
Date: Tue, 26 May 2015 15:29:10 +0200	[thread overview]
Message-ID: <55647526.9020802@redhat.com> (raw)
In-Reply-To: <1432618686-16077-1-git-send-email-crosthwaite.peter@gmail.com>



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 <kraxel@redhat.com>
> Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
> ---
> 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	other threads:[~2015-05-26 13:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  5:38 [Qemu-devel] [PATCH] Makefile.target: set master BUILD_DIR Peter Crosthwaite
2015-05-26 13:29 ` Paolo Bonzini [this message]
2015-05-26 17:15   ` Peter Crosthwaite
2015-05-26 17:17     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55647526.9020802@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).