aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmakeparser.y
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-08-04 09:37:27 +0000
committermarha <marha@users.sourceforge.net>2010-08-04 09:37:27 +0000
commitf19a1f2d41337986c94cecfd348aca32a5445993 (patch)
treeb50688dc07bfb1afadb4649d175bcbc64f1eb754 /tools/mhmake/src/mhmakeparser.y
parent240baf59a219841c5f8942c82f7ed61da9d2323b (diff)
downloadvcxsrv-f19a1f2d41337986c94cecfd348aca32a5445993.tar.gz
vcxsrv-f19a1f2d41337986c94cecfd348aca32a5445993.tar.bz2
vcxsrv-f19a1f2d41337986c94cecfd348aca32a5445993.zip
Added possibility to force a dependency scan on a target with .AUTODEPS
Diffstat (limited to 'tools/mhmake/src/mhmakeparser.y')
-rw-r--r--tools/mhmake/src/mhmakeparser.y21
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y
index 2b2e11411..c11c84319 100644
--- a/tools/mhmake/src/mhmakeparser.y
+++ b/tools/mhmake/src/mhmakeparser.y
@@ -42,7 +42,7 @@
%token <theString> COMMAND
%token <theString> COMMA OPENBRACE CLOSEBRACE
%token <theString> STRING DOLLAREXPR EQUAL COLON DOUBLECOLON
-%token IMEQUAL PEQUAL OPTEQUAL PHONY EXPORT NEWLINE INCLUDEMAK SPACE
+%token IMEQUAL PEQUAL OPTEQUAL PHONY AUTODEPS EXPORT NEWLINE INCLUDEMAK SPACE
%type <theString> expression nonspaceexpression simpleexpression
%type <theString> maybeemptyexpression
@@ -72,6 +72,7 @@ statement: NEWLINE |
includemak |
ruledef |
phonyrule |
+ autodepsrule |
varassignment |
imvarassignment |
pvarassignment |
@@ -142,6 +143,22 @@ phonyrule: PHONY COLON expression
NEWLINE
;
+autodepsrule: AUTODEPS COLON expression
+ {
+ vector< refptr<fileinfo> > Items;
+ SplitToItems(ExpandExpression($3),Items);
+ vector< refptr<fileinfo> >::iterator pIt=Items.begin();
+ while (pIt!=Items.end())
+ {
+ (*pIt)->SetAutoDepsScan(this);
+ pIt++;
+ }
+ PRINTF(("Defining autodeps rule : %s\n",$3.c_str()));
+ PRINTF((" Expanded to : %s\n",ExpandExpression($3).c_str()));
+ }
+ NEWLINE
+;
+
exportrule: EXPORT SPACE exportstrings NEWLINE
;
@@ -189,7 +206,7 @@ optvarassignment: STRING OPTEQUAL maybeemptyexpression
maybeemptyexpression: NEWLINE {$$=g_EmptyString;} |
expression NEWLINE |
- expression SPACE NEWLINE
+ expression SPACE NEWLINE
;
expression: nonspaceexpression |