[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] make: improve check for stale generated files i
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH] make: improve check for stale generated files in source dir |
Date: |
Wed, 21 Mar 2018 10:15:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
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é <address@hidden>
> ---
> Makefile | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)
Tested-by: Laurent Vivier <address@hidden>
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