]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/compulsory_tests/check_build.c
ccanlint: rename structures to match keys
[ccan] / tools / ccanlint / compulsory_tests / check_build.c
index 830ea91427d4faef8116d686287969ef5215f906..83b1c780e067046cc715fc479f7e79c64e22cdda 100644 (file)
@@ -24,12 +24,13 @@ static const char *can_build(struct manifest *m)
 static char *obj_list(const struct manifest *m)
 {
        char *list = talloc_strdup(m, "");
 static char *obj_list(const struct manifest *m)
 {
        char *list = talloc_strdup(m, "");
-       struct ccan_file *i;
+       struct manifest *i;
 
        /* Other CCAN deps. */
 
        /* Other CCAN deps. */
-       list_for_each(&m->dep_dirs, i, list) {
+       list_for_each(&m->deps, i, list) {
                if (i->compiled)
                if (i->compiled)
-                       list = talloc_asprintf_append(list, "%s ", i->compiled);
+                       list = talloc_asprintf_append(list, "%s ",
+                                                     i->compiled);
        }
        return list;
 }
        }
        return list;
 }
@@ -82,11 +83,12 @@ static void check_use_build(struct manifest *m,
        }
 }
 
        }
 }
 
-struct ccanlint check_build = {
-       .key = "check-link",
+struct ccanlint module_links = {
+       .key = "module_links",
        .name = "Module can be linked against trivial program",
        .check = check_use_build,
        .can_run = can_build,
        .name = "Module can be linked against trivial program",
        .check = check_use_build,
        .can_run = can_build,
+       .needs = "module_builds depends_build"
 };
 
 };
 
-REGISTER_TEST(check_build, &build, NULL);
+REGISTER_TEST(module_links);