Ion Badelescu's patch to mkdep should correct this.
--- mkdep.c.orig Sun Dec 1 12:08:25 1996
+++ mkdep.c Sun Dec 1 14:32:58 1996
@@ -40,6 +40,8 @@
memcpy(path->buffer+plen, name, len);
len += plen;
path->buffer[len] = '\0';
+ if (access(path->buffer, F_OK))
+ return;
if (!hasdep) {
hasdep = 1;