[Top][All Lists]

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

Help with automatic prrequisite generation

From: Cort Stratton
Subject: Help with automatic prrequisite generation
Date: Fri, 17 Jun 2005 13:47:27 -0700 (PDT)

I'm having a problem with automatic prerequisite generation as described in 
section 4.14 of the make manual.  I've implemented the technique as 
described, and it works great.  However, I run into problems if I remove or 
rename a header file; the file is still listed as a prerequisite in the 
existing .d files, which causes make to issue an error and abort before 
building ANY target.  Ideally, I'd like to add a "depclean" target which 
would delete all the .d files, but even that target would fail to build 
because of the missing prerequisite!

I can work around the problem using conditionals (e.g. Only include the .d 
files if the NODEPS variable isn't defined), but that requires the user to 
run "make depclean NODEPS=1", and I'm looking for a more transparent 

How is this problem generally dealt with? Is there a way to tell make to 
always ignore missing prerequisites for a particular target, without 
requiring the user to pass any special command-line options?

 - cort

reply via email to

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