]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/module_links.c
tools: enhance get_libs to get libraries for tests, too.
[ccan] / tools / ccanlint / tests / module_links.c
index 2dda642978f75b8512e3c97b7c3564f12ea49e17..d665ba7d6672f7a86849f6683686e6bb83fa42a3 100644 (file)
@@ -43,12 +43,12 @@ static char *obj_list(const struct manifest *m)
 
 static char *lib_list(const struct manifest *m)
 {
-       unsigned int i, num;
-       char **libs = get_libs(m, ".",
-                              &num, &m->info_file->compiled[COMPILE_NORMAL]);
+       unsigned int i;
+       char **libs;
        char *ret = talloc_strdup(m, "");
 
-       for (i = 0; i < num; i++)
+       libs = get_libs(m, m->dir, "depends", get_or_compile_info);
+       for (i = 0; libs[i]; i++)
                ret = talloc_asprintf_append(ret, "-l%s ", libs[i]);
        return ret;
 }