diff options
-rw-r--r-- | src/build.l | 10 | ||||
-rw-r--r-- | src/builder.cpp | 14 | ||||
-rw-r--r-- | src/filetarget.cpp | 2 |
3 files changed, 19 insertions, 7 deletions
diff --git a/src/build.l b/src/build.l index a18cbeb..620f9db 100644 --- a/src/build.l +++ b/src/build.l | |||
@@ -50,7 +50,9 @@ std::string strbuf; | |||
50 | BEGIN( regexp ); | 50 | BEGIN( regexp ); |
51 | strbuf = ""; | 51 | strbuf = ""; |
52 | } | 52 | } |
53 | <regexp>[^\n/]* strbuf += yytext; | 53 | <regexp>[^\n/\\]* strbuf += yytext; |
54 | <regexp>"\\/" strbuf += "/"; | ||
55 | <regexp>"\\" strbuf += "\\"; | ||
54 | <regexp>"/" { | 56 | <regexp>"/" { |
55 | BEGIN( INITIAL ); | 57 | BEGIN( INITIAL ); |
56 | yylval->strval = stringdup( strbuf.c_str() ); | 58 | yylval->strval = stringdup( strbuf.c_str() ); |
@@ -64,6 +66,12 @@ std::string strbuf; | |||
64 | return STRING; | 66 | return STRING; |
65 | } | 67 | } |
66 | 68 | ||
69 | [^ \t\r\n\'\":=,/][^ \t\r\n\'\"=,]+[^ \t\r\n\'\":=,] { | ||
70 | yylval->strval = stringdup( yytext ); | ||
71 | return STRING; | ||
72 | } | ||
73 | |||
74 | |||
67 | \" { | 75 | \" { |
68 | BEGIN( strdq ); | 76 | BEGIN( strdq ); |
69 | strbuf = ""; | 77 | strbuf = ""; |
diff --git a/src/builder.cpp b/src/builder.cpp index 6bde1b4..d448243 100644 --- a/src/builder.cpp +++ b/src/builder.cpp | |||
@@ -44,8 +44,6 @@ void Builder::build( const char *sAct ) | |||
44 | pAct = mAction[sAct]; | 44 | pAct = mAction[sAct]; |
45 | } | 45 | } |
46 | 46 | ||
47 | printf("--- %s ---\n", pAct->getName() ); | ||
48 | |||
49 | pAct->execute( *this ); | 47 | pAct->execute( *this ); |
50 | } | 48 | } |
51 | 49 | ||
@@ -183,13 +181,15 @@ void Builder::varSet( const char *sName, const char *sValue ) | |||
183 | { | 181 | { |
184 | checkVar( sContext, sName ); | 182 | checkVar( sContext, sName ); |
185 | 183 | ||
184 | std::string newVal = varRepl( sValue, sContext, NULL ); | ||
185 | |||
186 | if( sContext[0] == '\0' ) | 186 | if( sContext[0] == '\0' ) |
187 | { | 187 | { |
188 | mVar[sName] = sValue; | 188 | mVar[sName] = newVal; |
189 | } | 189 | } |
190 | else | 190 | else |
191 | { | 191 | { |
192 | mContVar[sContext.getString()][sName] = sValue; | 192 | mContVar[sContext.getString()][sName] = newVal; |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
@@ -197,18 +197,20 @@ void Builder::varAddSet( const char *sName, const char *sValue ) | |||
197 | { | 197 | { |
198 | checkVar( sContext, sName ); | 198 | checkVar( sContext, sName ); |
199 | 199 | ||
200 | std::string newVal = varRepl( sValue, sContext, NULL ); | ||
201 | |||
200 | if( sContext[0] == '\0' ) | 202 | if( sContext[0] == '\0' ) |
201 | { | 203 | { |
202 | std::string s = mVar[sName]; | 204 | std::string s = mVar[sName]; |
203 | s += " "; | 205 | s += " "; |
204 | s += sValue; | 206 | s += newVal; |
205 | mVar[sName] = s; | 207 | mVar[sName] = s; |
206 | } | 208 | } |
207 | else | 209 | else |
208 | { | 210 | { |
209 | std::string s = mContVar[sContext.getString()][sName]; | 211 | std::string s = mContVar[sContext.getString()][sName]; |
210 | s += " "; | 212 | s += " "; |
211 | s += sValue; | 213 | s += newVal; |
212 | mContVar[sContext.getString()][sName] = s; | 214 | mContVar[sContext.getString()][sName] = s; |
213 | } | 215 | } |
214 | } | 216 | } |
diff --git a/src/filetarget.cpp b/src/filetarget.cpp index f9367a4..cd95188 100644 --- a/src/filetarget.cpp +++ b/src/filetarget.cpp | |||
@@ -71,6 +71,7 @@ int nNew, nCache; | |||
71 | 71 | ||
72 | void FileTarget::check( Builder &bld ) | 72 | void FileTarget::check( Builder &bld ) |
73 | { | 73 | { |
74 | printf("--- %s ---\n", getName() ); | ||
74 | nNew = nCache = 0; | 75 | nNew = nCache = 0; |
75 | Rule *pRule = bld.getRule( sRule ); | 76 | Rule *pRule = bld.getRule( sRule ); |
76 | 77 | ||
@@ -80,6 +81,7 @@ void FileTarget::check( Builder &bld ) | |||
80 | 81 | ||
81 | bld.processRequires( lOutput ); | 82 | bld.processRequires( lOutput ); |
82 | 83 | ||
84 | |||
83 | for( std::list<Perform *>::iterator i = perf.begin(); | 85 | for( std::list<Perform *>::iterator i = perf.begin(); |
84 | i != perf.end(); i++ ) | 86 | i != perf.end(); i++ ) |
85 | { | 87 | { |