]> git.ozlabs.org Git - ccan/blobdiff - tools/depends.c
Joey's patch to ignore ccan/ lines in #include.
[ccan] / tools / depends.c
index d215441eead6acebe84b629d2b3c855b4191098c..2bf11415bd2e632290fa1e63a4efd3bd13add985 100644 (file)
@@ -1,5 +1,7 @@
-#include "talloc/talloc.h"
-#include "string/string.h"
+#include <ccan/talloc/talloc.h>
+#include <ccan/str/str.h>
+#include <ccan/grab_file/grab_file.h>
+#include <ccan/str_talloc/str_talloc.h>
 #include "tools.h"
 #include <err.h>
 #include <stdbool.h>
@@ -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];