On 03/16/2017 04:08 AM, Markus Armbruster wrote: > Sorry for chiming in late, I had missed this change. > > Stefan Hajnoczi <stefa...@redhat.com> writes: > >> From: "Daniel P. Berrange" <berra...@redhat.com> >> >> 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