]> git.ozlabs.org Git - ccan/blobdiff - tools/depends.c
ccanlint: Add -k option to keep results.
[ccan] / tools / depends.c
index c83d78b2cd4e3eb090a7bd50a7395972307caf66..6ac31cdc5ebce5e973c1b34b9c506c3672fa7ada 100644 (file)
@@ -39,7 +39,7 @@ lines_from_cmd(const void *ctx, unsigned int *num, char *format, ...)
  * temp_file helps here. */
 static char *compile_info(const void *ctx, const char *dir)
 {
-       char *info_c_file, *info, *errmsg, *ccandir;
+       char *info_c_file, *info, *ccandir, *compiled;
        size_t len;
        int fd;
 
@@ -60,8 +60,12 @@ static char *compile_info(const void *ctx, const char *dir)
 
        ccandir = talloc_dirname(ctx, dir);
        *strrchr(ccandir, '/') = '\0';
-       return compile_and_link(ctx, info_c_file, ccandir, "", "", "",
-                               &errmsg);
+
+       compiled = temp_file(ctx, "");
+       if (compile_and_link(ctx, info_c_file, ccandir, "", "", "",
+                            compiled))
+               return NULL;
+       return compiled;
 }
 
 static char **get_one_deps(const void *ctx, const char *dir,