[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Way to generate header files dependencies automatically
From: |
Marc Alff |
Subject: |
Re: Way to generate header files dependencies automatically |
Date: |
Thu, 23 Mar 2006 10:36:31 -0700 |
User-agent: |
Thunderbird 1.5 (X11/20051201) |
Hi Jeff
Jeff Safier wrote:
I am looking for a way that automake or any other tool to scan source
code (.c or .cpp) files and generate list of depedencies( meaning header
files) needed to compile the module. And if there is another tool how
to interface it with automake
I think Automake does that out of the box, by using the "depcomp" script
with the compiler (option -M).
Because the exact list of dependencies depends of the compiler flags (in
case of conditionally
included header files), computing the dependencies is as difficult as
doing a build,
so the philosophy is that dependencies are created **during** the build,
as a side effect of compiling a *.c or *.cpp file.
Look at directories named ".deps", they contains "*.Po" files,
which are Makefile fragments listing the dependencies for a file.
I hope this helps,
Marc Alff.