aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmakeparser.y
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-10-30 18:34:27 +0000
committermarha <marha@users.sourceforge.net>2010-10-30 18:34:27 +0000
commit75ef19188d021a5e965198bde774c1c33bedc1f3 (patch)
treef20be1d1e684a5388c0e386ea302c1b3e98359d0 /tools/mhmake/src/mhmakeparser.y
parentd9ddf066b898491827ffd6f1d115534c54c82f6b (diff)
downloadvcxsrv-75ef19188d021a5e965198bde774c1c33bedc1f3.tar.gz
vcxsrv-75ef19188d021a5e965198bde774c1c33bedc1f3.tar.bz2
vcxsrv-75ef19188d021a5e965198bde774c1c33bedc1f3.zip
Increased gnu make compatibility.
Diffstat (limited to 'tools/mhmake/src/mhmakeparser.y')
-rw-r--r--tools/mhmake/src/mhmakeparser.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y
index e2312b50e..f1ab48606 100644
--- a/tools/mhmake/src/mhmakeparser.y
+++ b/tools/mhmake/src/mhmakeparser.y
@@ -41,7 +41,7 @@
%token <theString> COMMAND
%token <theString> COMMA OPENBRACE CLOSEBRACE
-%token <theString> STRING DOLLAREXPR EQUAL COLON DOUBLECOLON
+%token <theString> STRING DOLLAREXPR EQUAL COLON DOUBLECOLON VARDEF VARVAL
%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE VPATH
%type <theString> expression nonspaceexpression simpleexpression
@@ -182,7 +182,12 @@ vpathrule: VPATH SPACE nonspaceexpression SPACE expression NEWLINE
}
;
-varassignment: STRING EQUAL maybeemptyexpression
+varassignment: VARDEF VARVAL
+ {
+ m_Variables[f_strip($1)]=$2;
+ PRINTF(("Defining variable %s to %s\n",f_strip($1).c_str(), $2.c_str()));
+ }
+ | STRING EQUAL maybeemptyexpression
{
m_Variables[$1]=$3;
PRINTF(("Setting variable %s to %s\n",$1.c_str(), $3.c_str()));