#include <tools/ccanlint/ccanlint.h>
#include <tools/tools.h>
-#include <ccan/talloc/talloc.h>
#include <ccan/str/str.h>
+#include <ccan/foreach/foreach.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "reduce_features.h"
#include "build.h"
-static const char *can_build(struct manifest *m)
+static const char *can_build(struct manifest *m UNNEEDED)
{
if (safe_mode)
return "Safe mode enabled";
}
static void check_depends_built_without_features(struct manifest *m,
- unsigned int *timeleft,
+ unsigned int *timeleft UNNEEDED,
struct score *score)
{
+ struct list_head *list;
struct manifest *i;
char *flags;
- flags = talloc_asprintf(score, "%s %s", cflags,
- REDUCE_FEATURES_FLAGS);
+ flags = tal_fmt(score, "%s %s", cflags, REDUCE_FEATURES_FLAGS);
- list_for_each(&m->deps, i, list) {
- char *errstr = build_submodule(i, flags, COMPILE_NOFEAT);
+ foreach_ptr(list, &m->deps, &m->test_deps) {
+ list_for_each(list, i, list) {
+ char *errstr = build_submodule(i, flags,
+ COMPILE_NOFEAT);
- if (errstr) {
- score->error = talloc_asprintf(score,
+ if (errstr) {
+ score->error = tal_fmt(score,
"Dependency %s"
" did not build:\n%s",
- i->basename, errstr);
- return;
+ i->modname,
+ errstr);
+ return;
+ }
}
}