help-make
[Top][All Lists]
Advanced

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

Re: how to use already existing .d files


From: Philip Guenther
Subject: Re: how to use already existing .d files
Date: Fri, 6 Dec 2013 10:29:01 -0800

On Fri, Dec 6, 2013 at 1:48 AM, Swapna Pawar <address@hidden> wrote:
>>>Without a complete and reproducible example, I don't see how you can be 
>>>helped by others then.
> We have attached one example with makefiles along with the sample .c file and 
> .h files.
...
> Step 2:
>                 - Rename 'makefile2' to 'makefile'
>             - Run the second makefile (i.e. makefile2) using 'make all' 
> command
>                 - this time, it will not generate the dependency (.d) files

Ah, you misunderstood my suggestion: I said "do not specify %.d as a
target in any rule", but you did more than that: you not only stopped
having it as a target (on the left-side of the colon) but also stopped
generating it.  As explained on the page I linked to, you want to
generate the .d files without naming them as targets.

(You also can generate the .d files along with the .o files in one
invocation of gcc, as described on that page at the link, but that's
"just" an optimization.)

If what I wrote doesn't make sense or doesn't seem to work, then READ THAT PAGE.


Philip Guenther



reply via email to

[Prev in Thread] Current Thread [Next in Thread]