- *strrchr(ccandir, '/') = '\0';
-
- compiled = temp_file(ctx, "");
- if (compile_and_link(ctx, info_c_file, ccandir, "", "", "",
- compiled))
- return NULL;
- return compiled;
+ if (strrchr(ccandir, '/'))
+ *strrchr(ccandir, '/') = '\0';
+
+ compiled = maybe_temp_file(ctx, "", false, "info");
+ if (compile_and_link(ctx, info_c_file, ccandir, "",
+ CCAN_COMPILER, CCAN_CFLAGS " -I.", "",
+ compiled, &output))
+ return compiled;
+ return NULL;