diff options
author | marha <marha@users.sourceforge.net> | 2010-10-22 14:00:01 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-10-22 14:00:01 +0000 |
commit | d74d9f4e60e48260ff1fad3ff00aaf000f111a66 (patch) | |
tree | fcf6ceee3ec04dc8521bbf12453d95cbe187dc40 /tools/mhmake/src/mhmakeparser.y | |
parent | 5a05343a8071f769d092d5bb6bdea9adf65eda9c (diff) | |
download | vcxsrv-d74d9f4e60e48260ff1fad3ff00aaf000f111a66.tar.gz vcxsrv-d74d9f4e60e48260ff1fad3ff00aaf000f111a66.tar.bz2 vcxsrv-d74d9f4e60e48260ff1fad3ff00aaf000f111a66.zip |
Increased gnu make compatibility
Optimised
Diffstat (limited to 'tools/mhmake/src/mhmakeparser.y')
-rw-r--r-- | tools/mhmake/src/mhmakeparser.y | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y index 107194d70..e2312b50e 100644 --- a/tools/mhmake/src/mhmakeparser.y +++ b/tools/mhmake/src/mhmakeparser.y @@ -1,6 +1,6 @@ /* This file is part of mhmake.
*
- * Copyright (C) 2001-2009 Marc Haesen
+ * Copyright (C) 2001-2010 marha@sourceforge.net
*
* Mhmake is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ %token <theString> COMMAND
%token <theString> COMMA OPENBRACE CLOSEBRACE
%token <theString> STRING DOLLAREXPR EQUAL COLON DOUBLECOLON
-%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE
+%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE VPATH
%type <theString> expression nonspaceexpression simpleexpression
%type <theString> maybeemptyexpression
@@ -69,6 +69,7 @@ statements : ;
statement: NEWLINE |
+ SPACE |
includemak |
ruledef |
phonyrule |
@@ -78,6 +79,7 @@ statement: NEWLINE | pvarassignment |
optvarassignment |
exportrule |
+ vpathrule |
COMMAND
{
if (!m_pCurrentRule)
@@ -129,9 +131,9 @@ rulecolon: COLON {$$=0;} | phonyrule: PHONY COLON expression
{
- vector< refptr<fileinfo> > Items;
+ vector<fileinfo*> Items;
SplitToItems(ExpandExpression($3),Items);
- vector< refptr<fileinfo> >::iterator pIt=Items.begin();
+ vector<fileinfo*>::iterator pIt=Items.begin();
while (pIt!=Items.end())
{
(*pIt)->SetPhony();
@@ -145,9 +147,9 @@ phonyrule: PHONY COLON expression autodepsrule: AUTODEPS COLON expression
{
- vector< refptr<fileinfo> > Items;
+ vector<fileinfo*> Items;
SplitToItems(ExpandExpression($3),Items);
- vector< refptr<fileinfo> >::iterator pIt=Items.begin();
+ vector<fileinfo*>::iterator pIt=Items.begin();
while (pIt!=Items.end())
{
(*pIt)->SetAutoDepsScan(this);
@@ -173,6 +175,13 @@ exportstring : STRING }
;
+vpathrule: VPATH SPACE nonspaceexpression SPACE expression NEWLINE
+ {
+ SetvPath(ExpandExpression($3),ExpandExpression($5));
+ PRINTF(("Setting vpath %s to %s\n",$3.c_str(),ExpandExpression($5).c_str()));
+ }
+;
+
varassignment: STRING EQUAL maybeemptyexpression
{
m_Variables[$1]=$3;
|