c++ - GCC Dependency Tracking: Is -M better than -MM? -
there 2 options tracking dependencies -m
, -mm
. difference -mm
omits system headers , headers included them.
my question: why want use -m
? inflates generated .d
files drastically, since system header includes large pack of other system headers. in addition, system headers cannot built make
, having them depencies yields no benefit. little benefit see - if required system header missing - make
reports missing header instead of gcc
reporting it. benefit of this?
to sum things up, see no reason why -m
useful @ all. missing something? scenarios there require 1 use -m
on -mm
.
most header files can't "built" make. they're listed prerequisites if change, source code relies on them rebuilt. example, if install security fix packages on system , modify 1 of system headers use, may want sure code rebuilt. these days backward-compatibility of base libraries such not needed of time, agree.
also, if you're cross-compiling "system" header files provided cross-target; these headers might embedded system or similar, , may change (in non-backward-compatible ways) more standard system.
Comments
Post a Comment