--- /dev/null
+#include "installcomponent.h"
+#include "builder.h"
+#include "file.h"
+#include "sourcepackage.h"
+#include "tool.h"
+
+using namespace std;
+
+InstallComponent::InstallComponent(SourcePackage &p, const string &n):
+ Component(p, n)
+{ }
+
+void InstallComponent::create_targets() const
+{
+ Builder &builder = package.get_builder();
+ Target *inst = builder.get_build_graph().get_target("install");
+ Tool © = builder.get_toolchain().get_tool("CP");
+
+ SourceList source_filenames = collect_source_files();
+ for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i)
+ {
+ FileTarget *ft;
+ if(Target *tgt = builder.get_vfs().get_target(*i))
+ ft = dynamic_cast<FileTarget *>(tgt);
+ else
+ ft = new File(builder, package, *i);
+ inst->add_dependency(*copy.create_target(*ft, name));
+ }
+}