FYI, To move this forward, I've modifed the top-level kvm-update et.al. target so that it forces OBJDIR=OBJ.kvm, specifically:
- it invokes "swan-build OBJDIR=OBJ.kvm" et.al. which, in turn, invokes "make OBJDIR=OBJ.kvm ..." - 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) 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) This means "make check UPDATEONLY=1" is unaffected (other than the above bug fix) Andrew PS: With this in place I can finally tweak the kvm-update target so that it does incremental builds. On 11 March 2015 at 23:26, Andrew Cagney <[email protected]> wrote: > > > On 11 March 2015 at 15:03, Antony Antony <[email protected]> wrote: > >> On Wed, Mar 11, 2015 at 11:46:12AM -0400, Andrew Cagney wrote: >> > Another of my local tweaks. >> > >> > Currently, a VM build (swan-build) unhelpfully deletes all OBJ.linux.* >> > directories. This, of course, includes any native build you've been >> > doing. I'd like to tweak things so that: >> > >> > - on the VM OBJDIR has .kvm (.vm?) appended so VM and host builds use >> > different directories >> > - swan-build, which should only be run on a VM, deletes OBJ.linix*.vm >> > (yes it should rely on "make distclean" but that's another story) >> > >> > Since the VM has its own private build directory this also gets us that >> bit >> > closer to not even needing the delete. >> >> Probably things got better recently. A couple of weeks ago, deleting >> OBJDIR inside VM was a safe strategy. >> > >> >> > I've appended the key part of the patch. The magic grep line matches >> what >> > virt-what does. >> > >> > Andrew >> > >> > diff --git a/mk/objdir.mk b/mk/objdir.mk >> > index f86c9db..a581319 100644 >> > --- a/mk/objdir.mk >> > +++ b/mk/objdir.mk >> > @@ -56,4 +56,8 @@ BUILDENV:=$(shell uname -s | tr 'A-Z' 'a-z' | sed -e >> > 's/\(.*\)-.*/\1/') >> > endif >> > export BUILDENV >> > >> > -OBJDIR?=OBJ.${BUILDENV}.${ARCH} >> > +ifeq ($(origin OBJDIR_KVM),undefined) >> > +OBJDIR_KVM:=$(shell grep -i QEMU /proc/cpuinfo >/dev/null 2>&1 && echo >> > .kvm) >> > +endif >> > + >> > +OBJDIR?=OBJ.${BUILDENV}.${ARCH}$(OBJDIR_KVM) >> >> 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/testing.mk or something. I >> am not sure if it is good idea for the upstream. >> >> > I'm not following. Why is appending .vm a problem? > It is certainly shorter than $(uname -r) "3.18.7-200.fc21.x86_64" which > should also be added. > > Why modobj isn't under $(OBJDIR) I don't know, perhaps it can be fixed? >
_______________________________________________ Swan-dev mailing list [email protected] https://lists.libreswan.org/mailman/listinfo/swan-dev
