- //const Tool &tar = toolchain.get_tool("TAR");
-
- string tarname = name;
- if(name=="@src")
- {
- tarname = package.get_name()+"-"+package.get_version();
- source_filenames.push_back(package.get_source_directory()/"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()==&package && !i->second->is_buildable())
- files.push_back(i->second);
- }
-
- /* XXX The source files don't have a package at the moment, so we can't
- create the tarball target until things get fixed up a bit */
- /*Target *result = tar.create_target(files, tarname);
-
- Target *tarballs_tgt = builder.get_target("tarballs");
- tarballs_tgt->add_dependency(*result);*/
-
- return;
+ FS::Path subdir = FS::dirname(FS::relative(path, gen_dir));
+ binfo.local_incpath.push_back(package.get_source_directory()/subdir);