git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Skrab Sah <skrab.sah@gmail.com>
To: "Đoàn Trần Công Danh" <congdanhqx@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 14:16:09 +0530	[thread overview]
Message-ID: <CA+J78MXtkYOALDqY4Bxva6nm+vJNtN_hO4w4vFTzx-7izP=zBA@mail.gmail.com> (raw)
In-Reply-To: <YyrHKmNIoV70sATE@danh.dev>

For foo.h and foo.h+, makeheaders tool already has a feature in it.
for more info. read the manual.

The tool is fast enough to handle the situation of generating a single file.
note: we can also manually edit header file, it is not gone only it's
auto generated.

For situations like struct, enum, preprocessor declaration, and compat
stuff I have mentioned in the previous mail.

On Wed, 21 Sept 2022 at 13:41, Đoàn Trần Công Danh <congdanhqx@gmail.com> wrote:
>
> 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:47 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
2022-09-21  8:46             ` Skrab Sah [this message]
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='CA+J78MXtkYOALDqY4Bxva6nm+vJNtN_hO4w4vFTzx-7izP=zBA@mail.gmail.com' \
    --to=skrab.sah@gmail.com \
    --cc=avarab@gmail.com \
    --cc=congdanhqx@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).