Re: Dependency issue in gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27 December 2010 07:06, Dhanavel wrote:
>
> Hi All,
>   i have a problem in resolving dependency issue of gcc compiler
> issue :
>   when i compile a set of C files using gcc compiler it generates  .o file
> and .d files,as my makefile was written in such a way. when i did any
> changes in C file and start rebuild it is throwing dependency errors..

(I can't stand this use of "throw" - there are no exceptions involved,
it's just giving errors, not throwing them, but anyway...)

> Reason behind it: when i clean the entire build using make clean, the
> compiling is going fine without errors. but without clean, if i rebuild with
> my changes it is throwing error as it looks for previous .d files.... please
> share you ideas how to rectify dependency issue without using make clean

This is not a gcc problem, it's a problem in your makefile, and is
about how to use make not gcc.
It's difficult to answer without knowing what your makefile does.

I would guess you need to define rules telling make how to generate
the .d files as targets, so that make can regenerate them when they
are missing.

Alternatively, use "-include" to include the .d files, which does not
give an error if they are missing.

Read the documentation on "include" by running "info make Include" for
more information, or in the online manual at
http://www.gnu.org/software/make/manual/html_node/Include.html



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux