This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Equivalent to gcc -M to build a list of *objects*
- From: Nick Patavalis <npat at inaccessnetworks dot com>
- To: gcc-help at gnu dot org
- Date: Mon, 12 May 2003 23:12:04 +0300
- Subject: Re: Equivalent to gcc -M to build a list of *objects*
- References: <vpqfznkezlm.fsf@ecrins.imag.fr>
On Mon, May 12, 2003 at 09:25:57PM +0200, Matthieu Moy wrote:
>
> I've tried to use "gcc -M" on each file having a main function, and to
> use something like sed 's/\.[ch]$/.o/', but this follows the
> #include in the .h files. If I have some dependencies only in some .c
> files, then, the list of objects is incomplete.
>
Runnning gcc -M on a ".c" file, gives you a list of all header files
it includes, directly or indirectly. What other kind of dependency
would you like to detect? This whole description is very fuzzy.
> Is there an option to pass to GCC to accomplish this task ? Are there
> some utilities doing this ? Do I have to do it myself ?
No I don't think there is any other option to pass to GCC, though I
don't fully understand your problem
/npat
--
Mathematics belongs to God.
-- Donald E. Knuth