X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Fbuild_objs.c;h=619c600807d2b7a29d463c0f83b3ca59864db409;hb=1d893107b3481639bf1fc6f96972457ac6e828f7;hp=2f189e859f25a8b523505609cafd31c429e3a443;hpb=5f44c8ca0eb66503db51e0df1b65ff173eb42f57;p=ccan diff --git a/tools/ccanlint/compulsory_tests/build_objs.c b/tools/ccanlint/compulsory_tests/build_objs.c index 2f189e85..619c6008 100644 --- a/tools/ccanlint/compulsory_tests/build_objs.c +++ b/tools/ccanlint/compulsory_tests/build_objs.c @@ -21,18 +21,19 @@ static const char *can_build(struct manifest *m) return NULL; } -static void *check_objs_build(struct manifest *m) +static void *check_objs_build(struct manifest *m, unsigned int *timeleft) { char *report = NULL; struct ccan_file *i; list_for_each(&m->c_files, i, list) { char *err; + char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name); /* One point for each obj file. */ build_objs.total_score++; - i->compiled = compile_object(m, i->name, &err); + i->compiled = compile_object(m, fullfile, ccan_dir, &err); if (!i->compiled) { if (report) report = talloc_append_string(report, err); @@ -49,6 +50,7 @@ static const char *describe_objs_build(struct manifest *m, void *check_result) } struct ccanlint build_objs = { + .key = "build-objs", .name = "Module object files can be built", .check = check_objs_build, .describe = describe_objs_build,