[EMAIL PROTECTED] said:
> But before I write this code, I wanted to check with this email list to see 
> if 1) my analysis was correct, and 2) to see if there's any other way to 
> skin this cat.

One way to handle it is something like this:

%.h:
        test ! -f "$@"
        grep -rl "$@" *.d | xargs -r rm
        @echo "==================================================="
        @echo "Stale dependencies cleaned up. Please restart make."
        @false

that is, if a stale .d file declares a dependency on a .h that no longer
exists, this rule tells make it can create the missing .h. But instead,
it looks for .d files with stale references to that header and deletes
them so they'll be regenerated with correct info on the next pass.

Jason



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to