<div dir="ltr"><div><div><div>FYI,<br><br></div>To move this forward, I've modifed the top-level kvm-update <a href="http://et.al" target="_blank">et.al</a>. target so that it forces OBJDIR=OBJ.kvm, specifically:<br><br></div>- it invokes "swan-build OBJDIR=OBJ.kvm" <a href="http://et.al" target="_blank">et.al</a>. which, in turn, invokes "make OBJDIR=OBJ.kvm ..."<br><br><div>- in an attempt to avoid unexpected behaviour, should someone just invoke "make" from the KVM command line, it also forces "OBJDIR=OBJ.kvm" into the current shell's environment (in general relying on environment variables makes for confusion)<br><br>As a bonus, it also fixes a bug where "swan-build" would "rm -rf OBJ.linux.*", it now does "rm -rf $(make showobjdir)", i.e., $(OBJDIR)<br><br></div><div>This means "make check UPDATEONLY=1" is unaffected (other than the above bug fix)<br><br></div><div>Andrew<br></div><br></div>PS: With this in place I can finally tweak the kvm-update target so that it does incremental builds.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 11 March 2015 at 23:26, Andrew Cagney <span dir="ltr"><<a href="mailto:andrew.cagney@gmail.com" target="_blank">andrew.cagney@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On 11 March 2015 at 15:03, Antony Antony <span dir="ltr"><<a href="mailto:antony@phenome.org" target="_blank">antony@phenome.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On Wed, Mar 11, 2015 at 11:46:12AM -0400, Andrew Cagney wrote:<br>
> Another of my local tweaks.<br>
><br>
> Currently, a VM build (swan-build) unhelpfully deletes all OBJ.linux.*<br>
> directories. This, of course, includes any native build you've been<br>
> doing. I'd like to tweak things so that:<br>
><br>
> - on the VM OBJDIR has .kvm (.vm?) appended so VM and host builds use<br>
> different directories<br>
> - swan-build, which should only be run on a VM, deletes OBJ.linix*.vm<br>
> (yes it should rely on "make distclean" but that's another story)<br>
><br>
> Since the VM has its own private build directory this also gets us that bit<br>
> closer to not even needing the delete.<br>
<br>
</span>Probably things got better recently. A couple of weeks ago, deleting OBJDIR inside VM was a safe strategy.<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span><br>
<br>
> I've appended the key part of the patch. The magic grep line matches what<br>
> virt-what does.<br>
><br>
> Andrew<br>
><br>
> diff --git a/mk/<a href="http://objdir.mk" target="_blank">objdir.mk</a> b/mk/<a href="http://objdir.mk" target="_blank">objdir.mk</a><br>
> index f86c9db..a581319 100644<br>
> --- a/mk/<a href="http://objdir.mk" target="_blank">objdir.mk</a><br>
> +++ b/mk/<a href="http://objdir.mk" target="_blank">objdir.mk</a><br>
> @@ -56,4 +56,8 @@ BUILDENV:=$(shell uname -s | tr 'A-Z' 'a-z' | sed -e<br>
> 's/\(.*\)-.*/\1/')<br>
> endif<br>
> export BUILDENV<br>
><br>
> -OBJDIR?=OBJ.${BUILDENV}.${ARCH}<br>
> +ifeq ($(origin OBJDIR_KVM),undefined)<br>
> +OBJDIR_KVM:=$(shell grep -i QEMU /proc/cpuinfo >/dev/null 2>&1 && echo<br>
> .kvm)<br>
> +endif<br>
> +<br>
> +OBJDIR?=OBJ.${BUILDENV}.${ARCH}$(OBJDIR_KVM)<br>
<br>
</span>If someone build on kvm, not running full testsuite, just building to install, suddenly directory will have OBJDIR_KVM. That does not sound convenient to me. This probably belong to mk/<a href="http://testing.mk" target="_blank">testing.mk</a> or something. I am not sure if it is good idea for the upstream.<br>
<br></blockquote><br></div></div></div><div class="gmail_quote">I'm not following. Why is appending .vm a problem?<br>It is certainly shorter than $(uname -r) "3.18.7-200.fc21.x86_64" which should also be added.<br><br></div><div class="gmail_quote">Why modobj isn't under $(OBJDIR) I don't know, perhaps it can be fixed?<br></div></div></div>
</blockquote></div><br></div>