aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-09-20 20:15:48 +0000
committerMike Buland <eichlan@xagasoft.com>2006-09-20 20:15:48 +0000
commit4ea12e162a40e43faae99225386aedb8a0b9f1c4 (patch)
tree6adc34408fce82eef3a711523688576a2a39f0bd
parent225c45a1a4f1300058974029dab71bdcfb889138 (diff)
downloadbuild-4ea12e162a40e43faae99225386aedb8a0b9f1c4.tar.gz
build-4ea12e162a40e43faae99225386aedb8a0b9f1c4.tar.bz2
build-4ea12e162a40e43faae99225386aedb8a0b9f1c4.tar.xz
build-4ea12e162a40e43faae99225386aedb8a0b9f1c4.zip
Viewer is nice now.
Diffstat (limited to '')
-rw-r--r--src/viewerplain.cpp30
-rw-r--r--src/viewerplain.h7
2 files changed, 34 insertions, 3 deletions
diff --git a/src/viewerplain.cpp b/src/viewerplain.cpp
index 5690215..d65c59d 100644
--- a/src/viewerplain.cpp
+++ b/src/viewerplain.cpp
@@ -4,7 +4,9 @@
4 4
5PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 ); 5PluginInterface2( plain, ViewerPlain, Viewer, "Mike Buland", 0, 1 );
6 6
7ViewerPlain::ViewerPlain() 7ViewerPlain::ViewerPlain() :
8 bCmdClean( true ),
9 bRunClean( true )
8{ 10{
9} 11}
10 12
@@ -14,16 +16,29 @@ ViewerPlain::~ViewerPlain()
14 16
15void ViewerPlain::beginCommand( Action::eAction nAct, const std::string &sTarget ) 17void ViewerPlain::beginCommand( Action::eAction nAct, const std::string &sTarget )
16{ 18{
17 printf("--- %s ---\n", sTarget.c_str() ); 19 bCmdClean = true;
20 this->sTarget = sTarget;
18} 21}
19 22
20void ViewerPlain::endCommand() 23void ViewerPlain::endCommand()
21{ 24{
22 printf("\n"); 25 if( bCmdClean == false )
26 printf("\n");
27}
28
29void ViewerPlain::printHead()
30{
31 if( bCmdClean == true )
32 {
33 bRunClean = false;
34 bCmdClean = false;
35 printf("--- %s ---\n", sTarget.c_str() );
36 }
23} 37}
24 38
25void ViewerPlain::beginRequiresCheck( bool bCached, const std::string &sName ) 39void ViewerPlain::beginRequiresCheck( bool bCached, const std::string &sName )
26{ 40{
41 printHead();
27 printf(" deps: %s\n", sName.c_str() ); 42 printf(" deps: %s\n", sName.c_str() );
28} 43}
29 44
@@ -33,6 +48,7 @@ void ViewerPlain::endRequiresCheck()
33 48
34void ViewerPlain::beginPerform( Perform *pPerform ) 49void ViewerPlain::beginPerform( Perform *pPerform )
35{ 50{
51 printHead();
36 printf(" %8s: %s\n", pPerform->getRule().c_str(), pPerform->getTarget().c_str() ); 52 printf(" %8s: %s\n", pPerform->getRule().c_str(), pPerform->getTarget().c_str() );
37} 53}
38 54
@@ -40,3 +56,11 @@ void ViewerPlain::endPerform()
40{ 56{
41} 57}
42 58
59void ViewerPlain::endAction()
60{
61 if( bRunClean == true )
62 {
63 printf("Nothing to be done.\n\n");
64 }
65}
66
diff --git a/src/viewerplain.h b/src/viewerplain.h
index 978d50b..76fecc5 100644
--- a/src/viewerplain.h
+++ b/src/viewerplain.h
@@ -19,7 +19,14 @@ public:
19 virtual void beginPerform( Perform *pPerform ); 19 virtual void beginPerform( Perform *pPerform );
20 virtual void endPerform(); 20 virtual void endPerform();
21 21
22 virtual void endAction();
23
24 void printHead();
25
22private: 26private:
27 bool bCmdClean;
28 bool bRunClean;
29 std::string sTarget;
23 30
24}; 31};
25 32