- Builder &builder = pkg.get_builder();
- const Toolchain &toolchain = builder.get_toolchain();
- Target *world = builder.get_target("world");
- Target *def_tgt = builder.get_target("default");
-
- PathList source_filenames = collect_source_files();
- list<Target *> inst_list;
-
- string inst_loc;
- if(type==TARBALL)
- {
- //const Tool &tar = toolchain.get_tool("TAR");
-
- string tarname = name;
- if(name=="@src")
- {
- tarname = pkg.get_name()+"-"+pkg.get_version();
- source_filenames.push_back(pkg.get_source()/"Build");
- }
-
- list<Target *> files;
- for(PathList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i)
- {
- FileTarget *file = builder.get_vfs().get_target(*i);
- if(!file)
- file = new File(builder, *i);
- files.push_back(file);
- }
-
- if(name=="@src")
- {
- const Builder::TargetMap &targets = builder.get_targets();
- for(Builder::TargetMap::const_iterator i=targets.begin(); i!=targets.end(); ++i)
- if(i->second->get_package()==&pkg && !i->second->is_buildable())
- files.push_back(i->second);
- }
+ // XXX Cache these and check that the directories actually exist before adding them
+ BuildInfo binfo = build_info;