X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fdepends.c;h=399b0aadf5affee6b8b814d2facc118a40150bf0;hb=3d5a1a3290b2075fbf4e60df37596668dfd6b898;hp=664b3972968263febd5ff762331ff3fd31f5d97b;hpb=dc8042b42500f79f613b1197df6cdf739615a89f;p=ccan diff --git a/tools/depends.c b/tools/depends.c index 664b3972..399b0aad 100644 --- a/tools/depends.c +++ b/tools/depends.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include "tools.h" @@ -61,8 +62,7 @@ char *compile_info(const void *ctx, const char *dir) compiled = temp_file(ctx, "", "info"); if (compile_and_link(ctx, info_c_file, find_ccan_dir(dir), "", - CCAN_COMPILER, CCAN_CFLAGS " -I.", "", - compiled, &output)) + compiler, cflags, "", compiled, &output)) return compiled; return NULL; } @@ -125,7 +125,7 @@ static char **get_one_safe_deps(const void *ctx, unsigned int i, n; bool correct_style = false; - fname = tal_fmt(ctx, "%s/_info", dir); + fname = path_join(ctx, dir, "_info"); raw = tal_grab_file(fname, fname, NULL); if (!raw) errx(1, "Could not open %s", fname); @@ -206,7 +206,7 @@ get_all_deps(const void *ctx, const char *dir, const char *style, if (!strstarts(deps[i], "ccan/")) continue; - subdir = tal_fmt(ctx, "%s/%s", find_ccan_dir(dir), deps[i]); + subdir = path_join(ctx, find_ccan_dir(dir), deps[i]); newdeps = get_one(ctx, subdir, "depends", get_info); /* Should be short, so brute-force out dups. */ @@ -279,8 +279,7 @@ char **get_libs(const void *ctx, const char *dir, const char *style, if (!strstarts(deps[i], "ccan/")) continue; - subdir = tal_fmt(ctx, "%s/%s", - find_ccan_dir(dir), deps[i]); + subdir = path_join(ctx, find_ccan_dir(dir), deps[i]); newlibs = get_one_libs(ctx, subdir, get_info); newlen = tal_count(newlibs);