if(conf_only)
return 0;
- if(create_targets())
+ if(!prepare_build())
return 1;
logger.log("environment", format("Building on %s, for %s%s", native_arch.get_name(),
return 0;
}
-int Builder::create_targets()
+bool Builder::prepare_build()
{
Target *world = new VirtualTarget(*this, "world");
if(!tgt)
{
IO::print("I don't know anything about %s\n", *i);
- return -1;
+ return false;
}
cmdline->add_depend(*tgt);
if(!tgt)
{
IO::print(IO::cerr, "Unknown what-if target %s\n", *i);
- return -1;
+ return false;
}
tgt->touch();
}
i->second->save_caches();
}
- return 0;
+ return true;
}
int Builder::do_build()
int load_build_file(const Msp::FS::Path &);
private:
- /** Creates targets for all packages and prepares them for building.
- Returns 0 if everything went ok, -1 if something bad happened and a build
- shouldn't be attempted. */
- int create_targets();
+ /** Prepares packages and targets for building. Returns true if everything
+ went ok, or false if something bad happened and a build shouldn't be
+ attempted. */
+ bool prepare_build();
/** Supervises the build process, starting new actions when slots become
available. */