aboutsummaryrefslogtreecommitdiff
path: root/src/build.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/build.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/build.cpp b/src/build.cpp
index b48e9f1..c81c885 100644
--- a/src/build.cpp
+++ b/src/build.cpp
@@ -168,6 +168,17 @@ void Build::setAdd( const std::string &cont, const std::string &var, const std::
168 } 168 }
169} 169}
170 170
171void Build::copyContext( const std::string &src, const std::string &dest )
172{
173 if( mContVars.find(src) == mContVars.end() )
174 return;
175
176 VarMap &d = mContVars[dest];
177 VarMap &s = mContVars[src];
178 for( VarMap::iterator i = s.begin(); i != s.end(); i++ )
179 d[(*i).first] = (*i).second;
180}
181
171std::string Build::getVar( const StringList *cont, const std::string &var, VarMap *mExtra ) 182std::string Build::getVar( const StringList *cont, const std::string &var, VarMap *mExtra )
172{ 183{
173 if( mExtra != NULL ) 184 if( mExtra != NULL )