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.gn4...@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-bd4afc7e4...@redhat.com/

See also for generic .*.inc admitted as convention:
https://lore.kernel.org/qemu-devel/cafeaca-kos3dkhh3srchg6ne8ql8kwyz+2ihdc6nd2v-seu...@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