#include <tools/ccanlint/ccanlint.h>
#include <tools/tools.h>
-#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
+#include <ccan/tal/path/path.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
}
void build_objects(struct manifest *m,
- bool keep, struct score *score, const char *flags,
+ struct score *score, const char *flags,
enum compile_type ctype)
{
struct ccan_file *i;
list_for_each(&m->c_files, i, list) {
char *output;
- char *fullfile = talloc_asprintf(m, "%s/%s", m->dir, i->name);
+ char *fullfile = path_join(m, m->dir, i->name);
- i->compiled[ctype] = maybe_temp_file(m, "", keep, fullfile);
+ i->compiled[ctype] = temp_file(m, "", fullfile);
if (!compile_object(score, fullfile, ccan_dir, compiler, flags,
i->compiled[ctype], &output)) {
- talloc_free(i->compiled[ctype]);
+ tal_free(i->compiled[ctype]);
score_file_error(score, i, 0,
"Compiling object files:\n%s",
output);
}
static void check_objs_build(struct manifest *m,
- bool keep,
unsigned int *timeleft, struct score *score)
{
- build_objects(m, keep, score, cflags, COMPILE_NORMAL);
+ build_objects(m, score, cflags, COMPILE_NORMAL);
}
struct ccanlint objects_build = {