Re: what if i use makeheader tool to generate c header file, it would be accepted.
- From
- Skrab Sah <skrab.sah@gmail.com>
- Date
- Sep 21, 2022, 08:46 UTC
- Message-ID
- <CA+J78MXtkYOALDqY4Bxva6nm+vJNtN_hO4w4vFTzx-7izP=zBA@mail.gmail.com>
- 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:
Show 24 quoted lines
> > 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