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

Re: [XEN PATCH v4 18/18] build, include: rework compat-build-header.py

On 16.04.2020 16:17, Anthony PERARD wrote:
> On Wed, Apr 08, 2020 at 03:56:02PM +0200, Jan Beulich wrote:
>> On 31.03.2020 12:31, Anthony PERARD wrote:
>>> Replace a mix of shell script and python script by all python script.
>>> Remove the unnecessary "grep -v '^# [0-9]'". It is to hide the
>>> linemarkers generated by the preprocessor. But adding -P inhibit there
>>> generation, thus the grep isn't needed anymore.
>>> gcc -E -P and clang -E -P have different behavior. While both don't
>>> generates linemarkers, gcc also removes all empty lines while clang
>>> keep them all. We don't need those empty lines, so we don't generates
>>> them in the final compat/%.h headers. (This replace `uniq` which was
>>> only de-duplicating empty line.)
>>> The only changes in the final generated headers it that they don't
>>> have empty lines anymore.
>> Making them harder to read? While typically no-one needs to look at
>> their contents, in case of problems it helps if generated files are
>> half way accessible to a human as well.
> I do think they are still readable. Those empty lines don't add much.
> There are so many of them that a `uniq` is needed...
> For example, with dm_op.h, we have this:

Let me take a different example, grant_table.h: Not all of the
blank lines it has are useful, but I think the file would suffer
if all of them got removed.




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.