+char **get_libs(const void *ctx, const char *dir,
+ const char *name, unsigned int *num,
+ char **infofile)
+{
+ char **libs, *cmd;
+
+ if (!*infofile) {
+ *infofile = compile_info(ctx, dir, name);
+ if (!*infofile)
+ errx(1, "Could not compile _info for '%s'", name);
+ }
+
+ cmd = talloc_asprintf(ctx, "%s libs", *infofile);
+ libs = lines_from_cmd(cmd, num, "%s", cmd);
+ if (!libs)
+ err(1, "Could not run '%s'", cmd);
+ return libs;
+}
+
+char **get_deps(const void *ctx, const char *dir, const char *name,
+ bool recurse, char **infofile)