X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fdepends.c;h=2bf11415bd2e632290fa1e63a4efd3bd13add985;hp=d215441eead6acebe84b629d2b3c855b4191098c;hb=15290c3feb9b61967311659a865fb3b5d05b1a49;hpb=023f704e8089f64bd7a77bb7f95b8ea5355fe640 diff --git a/tools/depends.c b/tools/depends.c index d215441e..2bf11415 100644 --- a/tools/depends.c +++ b/tools/depends.c @@ -1,5 +1,7 @@ -#include "talloc/talloc.h" -#include "string/string.h" +#include +#include +#include +#include #include "tools.h" #include #include @@ -110,6 +112,10 @@ static char **get_one_safe_deps(const void *ctx, char *str; unsigned int len; + /* Ignore lines starting with # (e.g. #include) */ + if (lines[i][0] == '#') + continue; + /* Start of line, or after ". */ if (strstarts(lines[i], "ccan/")) str = lines[i];