aboutsummaryrefslogtreecommitdiff
path: root/src/action.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-08-06 19:42:22 +0000
committerMike Buland <eichlan@xagasoft.com>2006-08-06 19:42:22 +0000
commit71c3c523aacb0f6986d50f4a7a2e5d604728a4c4 (patch)
tree9000ae982c9cb21d31ac3efa6ccf7100064f5bbb /src/action.cpp
parent2c0c23b75f563d0a1e68f6079a8eea73c40a877a (diff)
downloadbuild-71c3c523aacb0f6986d50f4a7a2e5d604728a4c4.tar.gz
build-71c3c523aacb0f6986d50f4a7a2e5d604728a4c4.tar.bz2
build-71c3c523aacb0f6986d50f4a7a2e5d604728a4c4.tar.xz
build-71c3c523aacb0f6986d50f4a7a2e5d604728a4c4.zip
A load of updates, most of these made me realize that I probably could do this
whole thing a lot better. We'll see how that works out later, once I figure out how to do it better.
Diffstat (limited to 'src/action.cpp')
-rw-r--r--src/action.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/action.cpp b/src/action.cpp
index 8907816..51868eb 100644
--- a/src/action.cpp
+++ b/src/action.cpp
@@ -23,6 +23,11 @@ void Action::add( Command *pCmd )
23 lCommand.push_back( pCmd ); 23 lCommand.push_back( pCmd );
24} 24}
25 25
26void Action::add( int nType, const char *sCmd )
27{
28 lRegExCommand.push_back( std::pair<int,std::string>( nType, sCmd ) );
29}
30
26void Action::debug() 31void Action::debug()
27{ 32{
28 if( bDefault ) 33 if( bDefault )
@@ -39,6 +44,16 @@ void Action::debug()
39 44
40void Action::execute( Builder &bld ) 45void Action::execute( Builder &bld )
41{ 46{
47 for( std::list<std::pair<int,std::string> >::iterator i =
48 lRegExCommand.begin(); i != lRegExCommand.end(); i++ )
49 {
50 std::list<std::string> lTmp = bld.findTargets( (*i).second.c_str() );
51 for( std::list<std::string>::iterator j = lTmp.begin();
52 j != lTmp.end(); j++ )
53 {
54 add( new Command( (Command::CmdType)(*i).first, (*j).c_str() ) );
55 }
56 }
42 for( std::list<Command *>::iterator i = lCommand.begin(); 57 for( std::list<Command *>::iterator i = lCommand.begin();
43 i != lCommand.end(); i++ ) 58 i != lCommand.end(); i++ )
44 { 59 {