From 53526ddd639aaed8ce90486b02ba621e02f6b505 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 2 Aug 2006 05:52:41 +0000 Subject: Some minor updates to the functionality --- src/build.l | 10 +++++++++- src/builder.cpp | 14 ++++++++------ 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; BEGIN( regexp ); strbuf = ""; } -[^\n/]* strbuf += yytext; +[^\n/\\]* strbuf += yytext; +"\\/" strbuf += "/"; +"\\" strbuf += "\\"; "/" { BEGIN( INITIAL ); yylval->strval = stringdup( strbuf.c_str() ); @@ -64,6 +66,12 @@ std::string strbuf; return STRING; } +[^ \t\r\n\'\":=,/][^ \t\r\n\'\"=,]+[^ \t\r\n\'\":=,] { + yylval->strval = stringdup( yytext ); + return STRING; +} + + \" { BEGIN( strdq ); 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 ) pAct = mAction[sAct]; } - printf("--- %s ---\n", pAct->getName() ); - pAct->execute( *this ); } @@ -183,13 +181,15 @@ void Builder::varSet( const char *sName, const char *sValue ) { checkVar( sContext, sName ); + std::string newVal = varRepl( sValue, sContext, NULL ); + if( sContext[0] == '\0' ) { - mVar[sName] = sValue; + mVar[sName] = newVal; } else { - mContVar[sContext.getString()][sName] = sValue; + mContVar[sContext.getString()][sName] = newVal; } } @@ -197,18 +197,20 @@ void Builder::varAddSet( const char *sName, const char *sValue ) { checkVar( sContext, sName ); + std::string newVal = varRepl( sValue, sContext, NULL ); + if( sContext[0] == '\0' ) { std::string s = mVar[sName]; s += " "; - s += sValue; + s += newVal; mVar[sName] = s; } else { std::string s = mContVar[sContext.getString()][sName]; s += " "; - s += sValue; + s += newVal; mContVar[sContext.getString()][sName] = s; } } 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; void FileTarget::check( Builder &bld ) { + printf("--- %s ---\n", getName() ); nNew = nCache = 0; Rule *pRule = bld.getRule( sRule ); @@ -80,6 +81,7 @@ void FileTarget::check( Builder &bld ) bld.processRequires( lOutput ); + for( std::list::iterator i = perf.begin(); i != perf.end(); i++ ) { -- cgit v1.2.3