aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-01 20:20:18 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-01 20:20:18 +0100
commitd35c91148c7884064ed6bbcfb97ea5e57da854c6 (patch)
tree4fceb7d2398c36473f6694fc63e0650b18769110
parentd573309a5994902a60cb44725623d26d88f34c4d (diff)
downloadpaludis-d35c91148c7884064ed6bbcfb97ea5e57da854c6.tar.gz
paludis-d35c91148c7884064ed6bbcfb97ea5e57da854c6.tar.xz
Crude --make-dependencies
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.cc20
-rw-r--r--src/clients/cave/cmd_resolve_cmdline.hh2
-rw-r--r--src/clients/cave/resolve_common.cc11
3 files changed, 21 insertions, 12 deletions
diff --git a/src/clients/cave/cmd_resolve_cmdline.cc b/src/clients/cave/cmd_resolve_cmdline.cc
index bb4acb0..b1641bb 100644
--- a/src/clients/cave/cmd_resolve_cmdline.cc
+++ b/src/clients/cave/cmd_resolve_cmdline.cc
@@ -228,16 +228,16 @@ ResolveCommandLineResolutionOptions::ResolveCommandLineResolutionOptions(args::A
("install", 'i', "Install targets to /")
("binaries", 'b', "Create binary packages for targets"),
"install"),
-// a_make_dependencies(&g_destination_options, "make-dependencies", 'M', "Specify what to do with dependencies of "
-// "targets. Only useful when '--make' is not set to 'install', since dependencies on / are considered "
-// "specially.",
-// args::EnumArg::EnumArgOptions
-// ("auto", '\0', "Select appropriate behaviour based upon --make. For 'install', 'all', and "
-// "for 'binaries', 'runtime'.")
-// ("runtime", 'r', "Only care about runtime dependencies")
-// ("all", 'a', "Care about all dependencies")
-// ("none", 'n', "Don't care about dependencies at all"),
-// "auto"),
+ a_make_dependencies(&g_destination_options, "make-dependencies", 'M', "Specify what to do with dependencies of "
+ "targets. Only useful when '--make' is not set to 'install', since dependencies on / are considered "
+ "specially.",
+ args::EnumArg::EnumArgOptions
+ ("auto", '\0', "Select appropriate behaviour based upon --make. For 'install', 'all', and "
+ "for 'binaries', 'runtime'.")
+ ("runtime", 'r', "Only care about runtime dependencies")
+ ("all", 'a', "Care about all dependencies")
+ ("none", 'n', "Don't care about dependencies at all"),
+ "auto"),
// a_via_binary(&g_destination_options, "via-binary", 'b', "When building a package matching the supplied spec, "
// "create a binary package and use that for the install. May be specified multiple times. If this option "
// "is not specified, a package will be built multiple times for multiple destinations"),
diff --git a/src/clients/cave/cmd_resolve_cmdline.hh b/src/clients/cave/cmd_resolve_cmdline.hh
index d872139..45a55ba 100644
--- a/src/clients/cave/cmd_resolve_cmdline.hh
+++ b/src/clients/cave/cmd_resolve_cmdline.hh
@@ -92,7 +92,7 @@ namespace paludis
args::ArgsGroup g_destination_options;
args::EnumArg a_make;
-// args::EnumArg a_make_dependencies;
+ args::EnumArg a_make_dependencies;
// args::StringSetArg a_via_binary;
// args::SwitchArg a_fetch;
diff --git a/src/clients/cave/resolve_common.cc b/src/clients/cave/resolve_common.cc
index 75e019e..5e4e40a 100644
--- a/src/clients/cave/resolve_common.cc
+++ b/src/clients/cave/resolve_common.cc
@@ -129,7 +129,16 @@ namespace
DestinationTypes visit(const DependencyReason &) const
{
- return DestinationTypes() + dt_install_to_slash;
+ DestinationTypes extras;
+ if (resolution_options.a_make.argument() == "binaries")
+ {
+ if (resolution_options.a_make_dependencies.argument() == "auto" ||
+ resolution_options.a_make_dependencies.argument() == "runtime" ||
+ resolution_options.a_make_dependencies.argument() == "all")
+ extras += dt_create_binary;
+ }
+
+ return (DestinationTypes() + dt_install_to_slash) | extras;
}
DestinationTypes visit(const PresetReason &) const