X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Fcompile_tests.c;h=6444fc17f02b2c017b5a7bf9b2134be58235fe4b;hp=57c257a2d828de68c1306dcfd1bcfbf2fe22097d;hb=747a69435d9f83c0968d9689c4951bc0233ffc5e;hpb=5f44c8ca0eb66503db51e0df1b65ff173eb42f57 diff --git a/tools/ccanlint/compulsory_tests/compile_tests.c b/tools/ccanlint/compulsory_tests/compile_tests.c index 57c257a2..6444fc17 100644 --- a/tools/ccanlint/compulsory_tests/compile_tests.c +++ b/tools/ccanlint/compulsory_tests/compile_tests.c @@ -28,7 +28,7 @@ static char *obj_list(const struct manifest *m, bool link_with_module) /* We expect to be linked with tap, unless that's us. */ if (!streq(m->basename, "tap")) - list = talloc_strdup(m, "../tap.o"); + list = talloc_asprintf(m, "%s/ccan/tap.o", ccan_dir); else list = talloc_strdup(m, ""); @@ -37,7 +37,7 @@ static char *obj_list(const struct manifest *m, bool link_with_module) list = talloc_asprintf_append(list, " %s", i->compiled); if (link_with_module) - list = talloc_asprintf_append(list, " ../%s.o", m->basename); + list = talloc_asprintf_append(list, " %s.o", m->dir); /* Other ccan modules. */ list_for_each(&m->dep_objs, i, list) @@ -49,7 +49,7 @@ static char *obj_list(const struct manifest *m, bool link_with_module) static char *lib_list(const struct manifest *m) { unsigned int i, num; - char **libs = get_libs(m, ".", ".", &num, &m->info_file->compiled); + char **libs = get_libs(m, ".", &num, &m->info_file->compiled); char *ret = talloc_strdup(m, ""); for (i = 0; i < num; i++) @@ -63,7 +63,7 @@ static char *compile(const void *ctx, { char *errmsg; - file->compiled = compile_and_link(ctx, file->name, + file->compiled = compile_and_link(ctx, file->fullname, ccan_dir, obj_list(m, link_with_module), fail ? "-DFAIL" : "", lib_list(m), &errmsg);