return list;
}
-static void *do_build(struct manifest *m)
+static void *do_build(struct manifest *m,
+ bool keep,
+ unsigned int *timeleft)
{
char *filename, *err;
build.total_score = 0;
return NULL;
}
- filename = link_objects(m, obj_list(m), &err);
- if (filename) {
- char *realname = talloc_asprintf(m, "../%s.o", m->basename);
+ filename = link_objects(m, m->basename, false, obj_list(m), &err);
+ if (filename && keep) {
+ char *realname = talloc_asprintf(m, "%s.o", m->dir);
/* We leave this object file around, all built. */
- if (rename(filename, realname) != 0)
+ if (!move_file(filename, realname))
return talloc_asprintf(m, "Failed to rename %s to %s",
filename, realname);
return NULL;
}
struct ccanlint build = {
- .name = "Module can be built",
+ .key = "build",
+ .name = "Module can be built from object files",
.total_score = 1,
.check = do_build,
.describe = describe_build,