[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Add -MP option
From: |
bauen1 |
Subject: |
Re: [Tinycc-devel] Add -MP option |
Date: |
Sun, 16 Feb 2020 17:22:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 |
Thanks for the feedback,
On 2/4/20 12:07 PM, Christian Jullien wrote:
> Hi,
>
> Giving your patch a try, I see minor format differences with what gcc does. I
> prefer your format :o). So it look good.
>
> How complex is it to support -MM which only generates dependencies for
> includes mentioned in your source file?
>
> gcc -MM
> Show dependencies of compilation units, excluding system header files. The
> printed output of dependencies is suitable to be copy-pasted into a Makefile.
TinyCC doesn't currently keep track of the depth of includes as far as I can
see, but it should be easy to add.
(Simply not adding entries generated by recursive calls of
`tcc_add_file_internal` should work for this)
>
> In this case, you should also support -M option which is what you currently
> do.
>
> gcc -M
> Show dependencies of compilation units, including system header files. The
> printed output of dependencies is suitable to be copy-pasted into a Makefile.
Currently `gen_makedeps` opens a file, so a bit refactoring would be required,
but possible.
>
> C.
>
> -----Original Message-----
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On
> Behalf Of bauen1 via Tinycc-devel
> Sent: Saturday, February 01, 2020 12:08
> To: address@hidden
> Cc: bauen1
> Subject: [Tinycc-devel] Add -MP option
>
> Hi,
>
> While looking into ways to improve my build system (prevent it from breaking
> when moving headers) I came across the -MP option.
>
> Since tcc currently doesn't support I've written a small patch to enable it.
>
> Please note that tcc's '-MP' implies '-MD' while gcc complains.
>
> - bauen1
>
>
>
>
I did however achieve what I need, having system headers part of the makefile
was an explicit goal for my project.
Due to lack of time I won't implement -M and -MM unless someone explicitly
requests me to do so.
- bauen1