git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: Skrab Sah <skrab.sah@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: what if i use makeheader tool to generate c header file, it would be accepted.
Date: Wed, 21 Sep 2022 15:11:22 +0700	[thread overview]
Message-ID: <YyrHKmNIoV70sATE@danh.dev> (raw)
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

  reply	other threads:[~2022-09-21  8:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  7:14 what if i use makeheader tool to generate c header file, it would be accepted Skrab Sah
2022-09-19 10:45 ` Ævar Arnfjörð Bjarmason
2022-09-19 17:40   ` Junio C Hamano
2022-09-20  8:40     ` Skrab Sah
2022-09-20  9:58       ` Ævar Arnfjörð Bjarmason
2022-09-21  7:53         ` Skrab Sah
2022-09-21  8:11           ` Đoàn Trần Công Danh [this message]
2022-09-21  8:46             ` Skrab Sah
2022-09-23  7:28           ` Ævar Arnfjörð Bjarmason
2022-09-24  8:19             ` Skrab Sah
2022-09-21 16:28       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YyrHKmNIoV70sATE@danh.dev \
    --to=congdanhqx@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=skrab.sah@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).