[Top][All Lists]

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

Re: Advanced Auto-Dependency Generation

From: Greg Chicares
Subject: Re: Advanced Auto-Dependency Generation
Date: Tue, 12 Apr 2005 13:33:00 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

On 2005-04-12 12:36 PM, Greg Kilfoyle wrote:

I have implemented dependency generation based on the information from
this web page:
Let's say I have just done a complete build and everything is up-to-
date. I then manually remove a dependency file for a particular .c file
and update a header file that the .c file is dependent on. If I then run
make, the .c file is not rebuilt.

Dependency files cache information that this technique needs;
it breaks if you remove them. Make won't recreate them when
that happens--they're created only as a side effect of the .o
rule. But you could guard against that by executing
  for z in *.o; { [ ! -e ${z%.o}.d ] && rm $z }
to remove any .o file whose .d file is gone.

reply via email to

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