[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] make: load only required dependency file
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] make: load only required dependency files. |
Date: |
Wed, 5 Aug 2015 19:40:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 05/08/2015 19:29, Victor Kaplansky wrote:
> The old rules.mak loads dependency .d files using include directive
> with file glob pattern "*.d". This breaks the build when build tree has
> remanent *.d files from another build.
>
> This patch fixes this by
> - loading precise list of .d files made from *.o and *.mo.
> - specifying explicit list of required dependency info files for
> *.hex autogenerated sources.
>
> Note that Makefile still includes some .d in rood directory by including
> "*.d".
>
> Signed-off-by: Victor Kaplansky <address@hidden>
> ---
> hw/i386/Makefile.objs | 2 ++
> rules.mak | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs
> index bd4f147..311d364 100644
> --- a/hw/i386/Makefile.objs
> +++ b/hw/i386/Makefile.objs
> @@ -10,6 +10,8 @@ obj-y += acpi-build.o
> hw/i386/acpi-build.o: hw/i386/acpi-build.c \
> hw/i386/acpi-dsdt.hex hw/i386/q35-acpi-dsdt.hex
>
> +-include hw/i386/acpi-dsdt.d hw/i386/q35-acpi-dsdt.d
> +
Having to include the files manually is ugly though.
The failed builds are ugly too, but I'm not sure which is worse... :(
Failed builds happen rarely and there are other cases where you should
just "make distclean" your way out of a failure. On the other hand,
more complicated makefiles have to be maintained always.
Paolo