X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Fbuild.c;h=efc0b27a44f80bf022ae8df6c3670da33a1db058;hp=1b3d878928b53ca738fba2c13b2f2f394a508d19;hb=357700fd05c2cf25563a0058fd68f2ffea827e74;hpb=5f44c8ca0eb66503db51e0df1b65ff173eb42f57 diff --git a/tools/ccanlint/compulsory_tests/build.c b/tools/ccanlint/compulsory_tests/build.c index 1b3d8789..efc0b27a 100644 --- a/tools/ccanlint/compulsory_tests/build.c +++ b/tools/ccanlint/compulsory_tests/build.c @@ -44,9 +44,9 @@ static void *do_build(struct manifest *m) } filename = link_objects(m, obj_list(m), &err); if (filename) { - char *realname = talloc_asprintf(m, "../%s.o", m->basename); + 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; @@ -62,7 +62,8 @@ static const char *describe_build(struct manifest *m, void *check_result) } 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,