qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/3] target: Rename headers using .def extension to .h.inc


From: Thomas Huth
Subject: Re: [PATCH 0/3] target: Rename headers using .def extension to .h.inc
Date: Thu, 27 Oct 2022 17:25:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 27/10/2022 16.12, Philippe Mathieu-Daudé wrote:
On 27/10/22 08:46, Thomas Huth wrote:
On 26/10/2022 01.50, Philippe Mathieu-Daudé wrote:
We use the .h.inc extension to include C headers. To be consistent
with the rest of the codebase, rename the C headers using the .def
extension.

IDE/tools using our .editorconfig / .gitattributes will leverage
this consistency.

Ack for this series, but I've got a meta-question: Does anybody remember why we are using .h.inc and not .inc.h for such headers? .h.inc has to be manually configured in most editors for supporting syntax highlighting here - with .inc.h most editors would get it right by default instead...

Daniel synthesized the reason here:
https://lore.kernel.org/qemu-devel/20200817165207.GN4775@redhat.com/

 >> IIRC, we need to use  c.inc, because Meson has specific semantics
 >> around a file ending in ".c" that we don't want.

First explanation from Paolo:

https://lore.kernel.org/qemu-devel/36032642-9bea-8625-65a6-bd4afc7e459d@redhat.com/

See also for generic .*.inc admitted as convention:
https://lore.kernel.org/qemu-devel/CAFEAcA-kOs3dKhh3SRchg6Ne8QL8kwyz+2ihDC6ND2v-seuRfw@mail.gmail.com/
Could be worth mentioning in docs/devel/build-system.rst...

Thanks for the summary! ... now if someone (who feels confident about all of this) could add some sentences to build-system.rst, that would be really great...

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]