[Omake] Re: RE : Re: preprocessor for computing dependencies
Bárður Árantsson
spam at scientician.net
Wed Sep 13 09:45:54 PDT 2006
Thomas Nagy wrote:
>> What's wrong with gcc -M?
>
> :-)
>
> * gcc -M does not output dependencies it cannot find
> in CPPPATH (like headers that need to be created by
> the build tool)
In that case one needs to instruct the build tool to run whatever
commands are needed to build the necessary headers before scanning, I
guess. Besides, what if your generated file depends on other .h files?
Point being: The "solution" of outputting dependencies on files which
aren't known doesn't really address the fundamental problem (nor can it
from it's limited vantage point) whereas a build system _can_.
(I realize that a general solution to this problem is not necessarily
easy to achieve, but the task definitely belongs to the build tool.)
> * not everyone uses gcc
Fair enough, but I suspect most(all?) compilers have equivalent options.
> * the gcc output is not really easy to parse
Easy as opposed to creating a standard-compliant C/C++ preprocessor?
> * gcc is quite slow (not going to the system includes
> for computing dependencies is enough in 99% of the
> cases)
Then gcc -MM is for you. :)
--
Bardur Arantsson
<bardurREMOVE at THISscientician.net>
Quality care or your autopsy is free.
Hospital Sign, 'The Simpsons'
More information about the Omake
mailing list