git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: what if i use makeheader tool to generate c header file, it would be accepted.

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Sep 21, 2022, 08:11 UTC
Message-ID
<YyrHKmNIoV70sATE@danh.dev>
In-Reply-To
<CA+J78MUM=JiAF7R_8oV23OQ-LndJbRm4AUdPsgS4HT4SduFgiw@mail.gmail.com>
On 2022-09-21 13:23:11+0530, Skrab Sah <skrab.sah@gmail.com> wrote:
> 1. We would not commit the generated file.
> 2. There are different ways we can install the makeheaders tool.
> 3. Makefile will first generate the header file then other compilation.

Without seeing the patches, here is my guess, you will make us only write source code in '*.c' and extract declaration from foo.c to foo.h And that will save us some time to write (and update) declaration in foo.h

However, whenever foo.c is updated, foo.h will need to be re-generated, thus all other users of foo.h will need to re-compiled. Thus, increase compilation time. We can work-around by write the output to foo.h+ and compare to foo.h, discard it if its content hasn't been changed. It still takes time to analyse foo.c and write to foo.h+

In addition, I'm not sure where would you put the struct, enum, preprocessor declaration, and compat stuff.

If my understanding is correct, it's not worth the effort, IMHO.
-- 
Danh
Previous: Skrab SahNext: Skrab Sah
Message 7 of 11 in “what if i use makeheader tool to generate c header file, it would be accepted.”
  1. Skrab SahSep 19, 2022
  2. Ævar Arnfjörð BjarmasonSep 19, 2022
  3. Junio C HamanoSep 19, 2022
  4. Skrab SahSep 20, 2022
  5. Ævar Arnfjörð BjarmasonSep 20, 2022
  6. Skrab SahSep 21, 2022
  7. Đoàn Trần Công DanhSep 21, 2022
  8. Skrab SahSep 21, 2022
  9. Ævar Arnfjörð BjarmasonSep 23, 2022
  10. Skrab SahSep 24, 2022
  11. Junio C HamanoSep 21, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.