unsigned int i;
/* We can include ourselves, of course. */
- if (streq(depname + strlen("ccan/"), m->basename))
+ if (streq(depname + strlen("ccan/"), m->modname))
return true;
for (i = 0; deps[i]; i++) {
char *mod;
if (!strreg(f, lines[i],
"^[ \t]*#[ \t]*include[ \t]*[<\"]"
- "(ccan/+[^/]+)/", &mod))
+ "(ccan/+.+)/+[^/]+.h", &mod))
continue;
if (has_dep(m, deps, used, mod))