From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Alexandre Raymond <cerbere@gmail.com>,
qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] Makefile: fix out-of-tree builds
Date: Mon, 25 Jul 2011 08:57:52 -0500 [thread overview]
Message-ID: <4E2D7660.8080406@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAJSP0QXUzpBLaYhvc3T-ArMaiZ7cxoo4ZsbDDrR8kjEq03P1cQ@mail.gmail.com>
On 07/25/2011 07:43 AM, Stefan Hajnoczi wrote:
> On Mon, Jul 25, 2011 at 1:16 PM, Michael Roth<mdroth@linux.vnet.ibm.com> wrote:
>> On 07/25/2011 05:15 AM, Stefan Hajnoczi wrote:
>>>
>>> On Thu, Jul 21, 2011 at 5:41 AM, Alexandre Raymond<cerbere@gmail.com>
>>> wrote:
>>>>
>>>> This patch fixes a minor bugs which prevented QEMU from being built
>>>> out of tree.
>>>>
>>>> Signed-off-by: Alexandre Raymond<cerbere@gmail.com>
>>>> ---
>>>> Makefile | 2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> I don't normally use --source-path but it still seems broken to me
>>> after applying your patch?
>>>
>>> $ cd /tmp; mkdir out; cd out
>>> $ ~/qemu/configure --source-path=$HOME/qemu
>>> $ make
>>> GEN config-all-devices.mak
>>> cat: i386-softmmu/config-devices.mak: No such file or directory
>>> cat: x86_64-softmmu/config-devices.mak: No such file or directory
>>> cat: alpha-softmmu/config-devices.mak: No such file or directory
>>>
>>> Stefan
>>>
>>
>> Works okay for me with and without the patch if I do a `make distclean` in
>> $HOME/qemu beforehand.
>>
>> Not sure what the trigger is for the breakage Alexandre is trying to
>> address.
>
> You are right that make distclean in the source directory solves the issue.
>
> Intuitively I expect ./configure to re-wire things, make distclean
> should not be necessary.
>
> Alexandre: Can you describe the case where you hit a build issue in more detail?
>
> Stefan
The root problem seems to be that by including $(SRC_DIR) in VPATH (via
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)), $(SRC_DIR) ends up being
searched for source files as well as target dependencies. So any crud
left in there can still satisfy dependencies when building outside
$SRC_PATH. I'm not sure there's a simple way around this except to
prefix all source files with $(SRC_PATH) and remove $(SRC_PATH) from
VPATH...I'm not even sure that would work though..
Perhaps just a friendly error message if we detect the $(SRC_PATH)
directory needs a distclean? Once you know that's the magic fix it's not
terribly inconvenient....alternatively we could automatically do the
distclean in $SRC_PATH but that might be considered overstepping our bounds.
Consequently, it seems like this patch would be a noop...default-configs
should never exist in an external build directory, so
$(SRC_PATH)/default-configs and default-configs end up being equivalent
when make eventually find it in $(SRC_PATH).
next prev parent reply other threads:[~2011-07-25 13:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 4:41 [Qemu-trivial] [PATCH] Makefile: fix out-of-tree builds Alexandre Raymond
2011-07-25 10:15 ` Stefan Hajnoczi
2011-07-25 12:16 ` Michael Roth
2011-07-25 12:43 ` Stefan Hajnoczi
2011-07-25 13:57 ` Michael Roth [this message]
2011-07-25 14:43 ` Stefan Hajnoczi
2011-07-25 15:06 ` Michael Roth
2011-07-25 15:51 ` Alexandre Raymond
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=4E2D7660.8080406@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=cerbere@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@gmail.com \
/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).