On 16 March 2018 at 18:12, Christian Borntraeger <borntrae...@de.ibm.com> wrote: > Does it make sense to have something like > > diff --git a/configure b/configure > index 831ebf2..67d7ae3 100755 > --- a/configure > +++ b/configure > @@ -552,6 +552,10 @@ else > pwd_is_source_path="n" > fi > > +if test -f $source_path\/qemu-version.h -a $pwd_is_source_path = "n" ; then > +error_exit "source path contains a stale configuration, cannot build outside" > +fi
We already have an equivalent check to that in Makefile; it looks for a config-host.mak: # Check that we're not trying to do an out-of-tree build from # a tree that's been used for an in-tree build. ifneq ($(realpath $(SRC_PATH)),$(realpath .)) ifneq ($(wildcard $(SRC_PATH)/config-host.mak),) $(error This is an out of tree build but your source tree ($(SRC_PATH)) \ seems to have been used for an in-tree build. You can fix this by running \ "$(MAKE) distclean && rm -rf *-linux-user *-softmmu" in your source tree) endif endif Before commit 428952cfa966f it was possible for an accidental run of 'make -j10' in the source tree to create qemu-options.def and qemu-version.h in the source tree before the makefile noticed you were trying it in the wrong directory. I think that after that it should be much harder to end up with these stale files, but of course if your tree already had a stale file from before then the commit won't clean it up for you... thanks -- PMM