[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATE
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables |
Date: |
Tue, 21 Mar 2017 08:48:24 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/16/2017 04:08 AM, Markus Armbruster wrote:
> Sorry for chiming in late, I had missed this change.
>
> Stefan Hajnoczi <address@hidden> writes:
>
>> From: "Daniel P. Berrange" <address@hidden>
>>
>> The only functional difference between the GENERATED_HEADERS
>> and GENERATED_SOURCES variables is that 'Makefile' has a
>> dependancy on GENERATED_HEADERS, causing generated header files
>> to be created immediatey at the start of the build process.
>> There is no reason why this early creation should be restricted
>> to the .h files, and not include .c files too.
>
> Actually, there is.
>
> Any prerequisites of Makefile are made even by make -n. Restricting
> them to the ones make -n absolutely needs is good practice.
In fact, this is part of what tripped me up in trying to get to a root
cause in why modifying scripts/tracetool/format/h.py didn't cause
trace.h to be regenerated. When trace.h is treated as a prerequisite of
Makefile, it's rules get run automatically and don't show up in 'make
--debug' output (you have to resort to the noisier 'make -d' to see that
the rule was run).
>
> Generated headers must be prerequisites of Makefile, because automatic
> dependency generation may fail without them.
>
> There is no such reason for generated non-headers.
>
>> Merge both of
>> the variables into a single GENERATED_FILES variable to make
>> it clear it is for any type of generated file.
>
> I don't hate this quite enough for an outright NAK at this late stage.
> I do hate it enough to ask you to think about it once more.
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature