- add("if", &Loader::condition);
- add("program", &Loader::program);
- add("library", &Loader::library);
- add("module", &Loader::module);
- add("headers", &Loader::headers);
- add("tar_file", &Loader::tar_file);
+ add("generate", &Loader::generate);
+ add("install", &Loader::component<InstallComponent>);
+ add("interface_version", &Loader::interface_version);
+ add("library", &Loader::component_arg<BinaryComponent, BinaryComponent::Type>, BinaryComponent::LIBRARY);
+ add("module", &Loader::component_arg<BinaryComponent, BinaryComponent::Type>, BinaryComponent::MODULE);
+ add("program", &Loader::component_arg<BinaryComponent, BinaryComponent::Type>, BinaryComponent::PROGRAM);
+ add("source_archive", &Loader::source_archive);
+ add("source_tarball", &Loader::source_archive);
+ add("tarball", &Loader::tarball);
+ add("version", &Loader::version);
+}
+
+void SourcePackage::Loader::finish()
+{
+ /* Make sure the source tarball is last in the list so targets from all
+ other components wil be created first */
+ auto i = find(obj.components, obj.source_archive);
+ if(i!=obj.components.end())
+ {
+ obj.components.erase(i);
+ obj.components.push_back(obj.source_archive);
+ }