diff options
Diffstat (limited to '')
-rw-r--r-- | src/builder.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/builder.cpp b/src/builder.cpp index c4f2d12..65ae0c2 100644 --- a/src/builder.cpp +++ b/src/builder.cpp | |||
@@ -6,14 +6,16 @@ | |||
6 | #include "target.h" | 6 | #include "target.h" |
7 | #include "build.tab.h" | 7 | #include "build.tab.h" |
8 | #include "rule.h" | 8 | #include "rule.h" |
9 | #include "viewer.h" | ||
9 | 10 | ||
10 | subExceptionDef( BuildException ) | 11 | subExceptionDef( BuildException ) |
11 | 12 | ||
12 | Builder::Builder() : | 13 | Builder::Builder( Viewer &rView ) : |
13 | pDefaultAction( NULL ), | 14 | pDefaultAction( NULL ), |
14 | pLastAddedAction( NULL ), | 15 | pLastAddedAction( NULL ), |
15 | sTmp(""), | 16 | sTmp(""), |
16 | sContext("") | 17 | sContext(""), |
18 | rView( rView ) | ||
17 | { | 19 | { |
18 | } | 20 | } |
19 | 21 | ||
@@ -44,7 +46,11 @@ void Builder::build( const char *sAct ) | |||
44 | pAct = mAction[sAct]; | 46 | pAct = mAction[sAct]; |
45 | } | 47 | } |
46 | 48 | ||
49 | rView.beginAction( sAct, pAct->getNumCommands() ); | ||
50 | |||
47 | pAct->execute( *this ); | 51 | pAct->execute( *this ); |
52 | |||
53 | rView.endAction(); | ||
48 | } | 54 | } |
49 | 55 | ||
50 | void Builder::execute( Action *pAct ) | 56 | void Builder::execute( Action *pAct ) |
@@ -318,6 +324,8 @@ void Builder::genRequiresFor( const char *sName ) | |||
318 | { | 324 | { |
319 | varmap *revars = regexVars( re ); | 325 | varmap *revars = regexVars( re ); |
320 | std::string s = varRepl( (*i).second.c_str(), "", revars ); | 326 | std::string s = varRepl( (*i).second.c_str(), "", revars ); |
327 | rView.beginExtraRequiresCheck( s.c_str() ); | ||
328 | rView.executeCmd( s.c_str() ); | ||
321 | FILE *fcmd = popen( s.c_str(), "r" ); | 329 | FILE *fcmd = popen( s.c_str(), "r" ); |
322 | std::string rhs; | 330 | std::string rhs; |
323 | bool bHeader = true; | 331 | bool bHeader = true; |
@@ -366,6 +374,7 @@ void Builder::genRequiresFor( const char *sName ) | |||
366 | } | 374 | } |
367 | pclose( fcmd ); | 375 | pclose( fcmd ); |
368 | delete revars; | 376 | delete revars; |
377 | rView.endExtraRequiresCheck(); | ||
369 | } | 378 | } |
370 | } | 379 | } |
371 | } | 380 | } |