03-27-07 06:18 AM
Rares Vernica wrote:
> I am working at a C++ project with many .h files. In the Makefile, for
> each .cc file I need to list the .h files on which the .cc file depends
> on so that it is recompiled whenever any of those changes.
>
> What tool would you recommended for finding .h dependencies for a given
> .cc file?
How about :
$ whatis makedepend
makedepend (1x) - create dependencies in makefiles
$
I believe it's originally intended for C programs, but this is really
a C preprocessor matter, not a compiler issue, so I think in this case
what works for C will work for C++. Hmm, except that makedepend may
have difficulty with stuff like "#include <iostream>" (i.e. the missing
".h").
- Logan
[ Post a follow-up to this message ]
|