diff options
author | Mike Buland <eichlan@xagasoft.com> | 2010-01-04 23:42:55 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2010-01-04 23:42:55 +0000 |
commit | 8c23a24f76814ab10006491be0e1cadaefb06fa1 (patch) | |
tree | 6d23ab2b5d9aab9558bbee0b02a5273fa114ccfc /src/viewdefault.cpp | |
parent | abe69082514b61181c6bc15a341895c971ecdc43 (diff) | |
download | build-8c23a24f76814ab10006491be0e1cadaefb06fa1.tar.gz build-8c23a24f76814ab10006491be0e1cadaefb06fa1.tar.bz2 build-8c23a24f76814ab10006491be0e1cadaefb06fa1.tar.xz build-8c23a24f76814ab10006491be0e1cadaefb06fa1.zip |
Ok, now I've cleaned up the output to match the new revised build requires
procedure in the default view, it's really much nicer.
Diffstat (limited to 'src/viewdefault.cpp')
-rw-r--r-- | src/viewdefault.cpp | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/viewdefault.cpp b/src/viewdefault.cpp index c38c62f..25082ac 100644 --- a/src/viewdefault.cpp +++ b/src/viewdefault.cpp | |||
@@ -31,6 +31,8 @@ PluginInterface3( pluginViewDefault, default, ViewDefault, View, | |||
31 | 31 | ||
32 | ViewDefault::ViewDefault() : | 32 | ViewDefault::ViewDefault() : |
33 | bFirst( true ), | 33 | bFirst( true ), |
34 | bDisped( false ), | ||
35 | bDispedTrg( false ), | ||
34 | iDepth( 0 ), | 36 | iDepth( 0 ), |
35 | iTotal( 0 ), | 37 | iTotal( 0 ), |
36 | iCurrent( 0 ) | 38 | iCurrent( 0 ) |
@@ -39,6 +41,10 @@ ViewDefault::ViewDefault() : | |||
39 | 41 | ||
40 | ViewDefault::~ViewDefault() | 42 | ViewDefault::~ViewDefault() |
41 | { | 43 | { |
44 | if( bDisped == false ) | ||
45 | { | ||
46 | sio << "Nothing to be done." << sio.nl << sio.nl; | ||
47 | } | ||
42 | } | 48 | } |
43 | 49 | ||
44 | void ViewDefault::beginAction( const Bu::FString &/*sAction*/ ) | 50 | void ViewDefault::beginAction( const Bu::FString &/*sAction*/ ) |
@@ -55,11 +61,12 @@ void ViewDefault::skipTarget( const Bu::FString &/*sProfile*/, | |||
55 | iCurrent++; | 61 | iCurrent++; |
56 | } | 62 | } |
57 | 63 | ||
58 | void ViewDefault::beginTarget( const Bu::FString &sProfile, | 64 | void ViewDefault::beginTarget( const Bu::FString &/*sProfile*/, |
59 | const Target &rTarget ) | 65 | const Target &rTarget ) |
60 | { | 66 | { |
61 | if( iDepth == 0 ) | 67 | if( iDepth == 0 ) |
62 | { | 68 | { |
69 | bDispedTrg = false; | ||
63 | iTotal = rTarget.getDepCount(); | 70 | iTotal = rTarget.getDepCount(); |
64 | iCurrent = 0; | 71 | iCurrent = 0; |
65 | if( bFirst == false ) | 72 | if( bFirst == false ) |
@@ -67,16 +74,20 @@ void ViewDefault::beginTarget( const Bu::FString &sProfile, | |||
67 | sio << sio.nl; | 74 | sio << sio.nl; |
68 | } | 75 | } |
69 | bFirst = false; | 76 | bFirst = false; |
70 | sio << C_BR_WHITE << " --- " << C_BR_CYAN << sProfile << " " | ||
71 | << rTarget.getOutputList().first() << C_BR_WHITE << " --- " | ||
72 | << C_RESET << sio.nl; | ||
73 | } | 77 | } |
74 | iDepth++; | 78 | iDepth++; |
75 | } | 79 | } |
76 | 80 | ||
77 | void ViewDefault::processTarget( const Bu::FString &/*sProfile*/, | 81 | void ViewDefault::processTarget( const Bu::FString &sProfile, |
78 | const Target &rTarget ) | 82 | const Target &rTarget ) |
79 | { | 83 | { |
84 | if( bDispedTrg == false ) | ||
85 | { | ||
86 | bDispedTrg = true; | ||
87 | sio << C_BR_WHITE << " --- " << C_BR_CYAN << sProfile << " " | ||
88 | << rTarget.getOutputList().first() << C_BR_WHITE << " --- " | ||
89 | << C_RESET << sio.nl; | ||
90 | } | ||
80 | iCurrent++; | 91 | iCurrent++; |
81 | 92 | ||
82 | int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); | 93 | int iPct = (iTotal>0)?(iCurrent*100/iTotal):(100); |
@@ -84,6 +95,8 @@ void ViewDefault::processTarget( const Bu::FString &/*sProfile*/, | |||
84 | << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA | 95 | << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA |
85 | << Fmt(10) << rTarget.getDisplay() << C_BR_WHITE | 96 | << Fmt(10) << rTarget.getDisplay() << C_BR_WHITE |
86 | << ": " << rTarget.getOutputList().first() << C_RESET << sio.nl; | 97 | << ": " << rTarget.getOutputList().first() << C_RESET << sio.nl; |
98 | |||
99 | bDisped = true; | ||
87 | } | 100 | } |
88 | 101 | ||
89 | void ViewDefault::endTarget() | 102 | void ViewDefault::endTarget() |
@@ -98,6 +111,7 @@ void ViewDefault::buildRequires( const Target &rTarget ) | |||
98 | << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA | 111 | << "%" << C_BR_WHITE << "] " << C_BR_MAGENTA |
99 | << Fmt(10) << "deps" << C_BR_WHITE | 112 | << Fmt(10) << "deps" << C_BR_WHITE |
100 | << ": " << rTarget.getOutputList().first() << C_RESET << sio.nl; | 113 | << ": " << rTarget.getOutputList().first() << C_RESET << sio.nl; |
114 | bDisped = true; | ||
101 | } | 115 | } |
102 | 116 | ||
103 | void ViewDefault::cmdStarted( const Bu::FString &/*sCmd*/ ) | 117 | void ViewDefault::cmdStarted( const Bu::FString &/*sCmd*/ ) |
@@ -141,30 +155,36 @@ void ViewDefault::cmdFinished( const Bu::FString &sStdOut, | |||
141 | } | 155 | } |
142 | //sio << C_BR_WHITE << "[" << C_BR_GREEN << sStdOut << C_BR_WHITE << "]" << sio.nl; | 156 | //sio << C_BR_WHITE << "[" << C_BR_GREEN << sStdOut << C_BR_WHITE << "]" << sio.nl; |
143 | //sio << C_BR_WHITE << "[" << C_BR_RED << sStdErr << C_BR_WHITE << "]" << sio.nl; | 157 | //sio << C_BR_WHITE << "[" << C_BR_RED << sStdErr << C_BR_WHITE << "]" << sio.nl; |
158 | bDisped = true; | ||
144 | } | 159 | } |
145 | 160 | ||
146 | void ViewDefault::userError( const Bu::FString &sMsg ) | 161 | void ViewDefault::userError( const Bu::FString &sMsg ) |
147 | { | 162 | { |
148 | sio << C_BR_RED << "Error: " << sMsg << C_RESET << sio.nl; | 163 | sio << C_BR_RED << "Error: " << sMsg << C_RESET << sio.nl; |
164 | bDisped = true; | ||
149 | } | 165 | } |
150 | 166 | ||
151 | void ViewDefault::userWarning( const Bu::FString &sMsg ) | 167 | void ViewDefault::userWarning( const Bu::FString &sMsg ) |
152 | { | 168 | { |
153 | sio << C_BR_YELLOW << "Warning: " << sMsg << C_RESET << sio.nl; | 169 | sio << C_BR_YELLOW << "Warning: " << sMsg << C_RESET << sio.nl; |
170 | bDisped = true; | ||
154 | } | 171 | } |
155 | 172 | ||
156 | void ViewDefault::userNotice( const Bu::FString &sMsg ) | 173 | void ViewDefault::userNotice( const Bu::FString &sMsg ) |
157 | { | 174 | { |
158 | sio << C_BR_GREEN << "Notice: " << sMsg << C_RESET << sio.nl; | 175 | sio << C_BR_GREEN << "Notice: " << sMsg << C_RESET << sio.nl; |
176 | bDisped = true; | ||
159 | } | 177 | } |
160 | 178 | ||
161 | void ViewDefault::sysError( const Bu::FString &sMsg ) | 179 | void ViewDefault::sysError( const Bu::FString &sMsg ) |
162 | { | 180 | { |
163 | sio << C_BR_RED << sMsg << C_RESET << sio.nl; | 181 | sio << C_BR_RED << sMsg << C_RESET << sio.nl; |
182 | bDisped = true; | ||
164 | } | 183 | } |
165 | 184 | ||
166 | void ViewDefault::sysWarning( const Bu::FString &sMsg ) | 185 | void ViewDefault::sysWarning( const Bu::FString &sMsg ) |
167 | { | 186 | { |
168 | sio << C_BR_YELLOW << sMsg << C_RESET << sio.nl; | 187 | sio << C_BR_YELLOW << sMsg << C_RESET << sio.nl; |
188 | bDisped = true; | ||
169 | } | 189 | } |
170 | 190 | ||