aboutsummaryrefslogtreecommitdiff
path: root/paludis/environments/paludis/output_conf.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 13:03:37 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-09-14 13:03:37 +0100
commit7d101615917b9a8f011b9841409c455c0732c885 (patch)
tree5ae22cf6aba8b8efe6808594b42efa064f4ae58f /paludis/environments/paludis/output_conf.cc
parent12fdd07da80b04724dce37b1a5d87215be245999 (diff)
downloadpaludis-7d101615917b9a8f011b9841409c455c0732c885.tar.gz
paludis-7d101615917b9a8f011b9841409c455c0732c885.tar.xz
Pass root into output confs
Diffstat (limited to 'paludis/environments/paludis/output_conf.cc')
-rw-r--r--paludis/environments/paludis/output_conf.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/paludis/environments/paludis/output_conf.cc b/paludis/environments/paludis/output_conf.cc
index 6e5b965..44d5cea 100644
--- a/paludis/environments/paludis/output_conf.cc
+++ b/paludis/environments/paludis/output_conf.cc
@@ -332,10 +332,15 @@ namespace
}
void
-OutputConf::add(const FSPath & filename)
+OutputConf::add(const FSPath & filename, const FSPath & root)
{
Context context("When adding source '" + stringify(filename) + "' as an output file:");
+ _imp->predefined_variables->erase(std::string("root"));
+ _imp->predefined_variables->insert("root", stringify(root));
+ _imp->predefined_variables->erase(std::string("ROOT"));
+ _imp->predefined_variables->insert("ROOT", stringify(root));
+
std::shared_ptr<KeyValueConfigFile> f(make_bashable_kv_conf(filename,
_imp->predefined_variables, { kvcfo_allow_sections, kvcfo_allow_fancy_assigns, kvcfo_allow_env }));
if (! f)
@@ -491,3 +496,4 @@ namespace paludis
{
template class Pimp<paludis_environment::OutputConf>;
}
+