Le 20/03/2018 à 15:23, Daniel P. Berrangé a écrit : > When doing a build with builddir != srcdir, if any generated files are > accidentally present in srcdir from a previous build, these can cause > unexpected failures. > > Currently there is a rule that checks for existance of config-host.mak, > but there have been cases where config-host.mak is absent, while other > generated files still exist. > > Update the check to look at every file listed in $(GENERATED_FILES). To > do this we must move the check further down after $(GENERATED_FILES) has > been populated. > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > --- > Makefile | 29 +++++++++++++++++++---------- > 1 file changed, 19 insertions(+), 10 deletions(-)
Tested-by: Laurent Vivier <laur...@vivier.eu> I had a stale qemu-version.h and this change has correctly detected it. The problem was: $ make -C build/all ... ./qemu-nbd.c: In function ‘version’: ./qemu-nbd.c:133:7: error: expected ‘)’ before ‘QEMU_FULL_VERSION’ "%s " QEMU_FULL_VERSION "\n" ^~~~~~~~~~~~~~~~~ ./qemu-nbd.c:133:3: error: format ‘%s’ expects a matching ‘char *’ argument [-Werror=format=] "%s " QEMU_FULL_VERSION "\n" ~^ cc1: all warnings being treated as errors make: *** [./rules.mak:66: qemu-nbd.o] Error 1 make: *** Waiting for unfinished jobs.... make: Leaving directory './build/all' once the file removed, the build can be done. Thanks, Laurent