Re: [dev] Automatic C header dependency tracking for the redo build-system

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 9 Jun 2022 09:43:09 +0200

Hi,

On Tue, Jun 07, 2022 at 03:21:49PM +0200, David Demelier wrote:
> -include ${DEPS}
...
> And you're done. On a fresh directory the -include ${DEPS} will
> silently fail and rebuild everything. Then .d files will be generated
> and touching any file will rebuild exactly what should be.
>
> The only non portable thing is the -MMD option (gcc and clang support
> though).

-include is not portable. Also, not related to the original topic,
but in general is better to just define OBJ instead of defining SRC,
because you as a object generator are interested in the objects, no
in the sources. It can drive to problems because the standard does not
define how the expansion is done in inference rules and things like:

$(OBJ): xxxx


don't work in nmake if OBJ is a expansion of SRC.


Regards,
Received on Thu Jun 09 2022 - 09:43:09 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 09 2022 - 10:48:08 CEST