diff options
author | marha <marha@users.sourceforge.net> | 2010-10-18 06:31:05 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-10-18 06:31:05 +0000 |
commit | f7b6403a13075049d9577e6f061b6d7f718d3ca9 (patch) | |
tree | cef844b3c6e57e872e50668df5d62fa03effd028 | |
parent | 057471268f10a87f27bda540049c83efcde43689 (diff) | |
download | vcxsrv-f7b6403a13075049d9577e6f061b6d7f718d3ca9.tar.gz vcxsrv-f7b6403a13075049d9577e6f061b6d7f718d3ca9.tar.bz2 vcxsrv-f7b6403a13075049d9577e6f061b6d7f718d3ca9.zip |
Also rebuild everything if one of the exported variables is changed
-rw-r--r-- | tools/mhmake/src/mhmakefileparser.cpp | 15 | ||||
-rw-r--r-- | tools/mhmake/src/mhmakefileparser.h | 1 | ||||
-rw-r--r-- | tools/mhmake/src/mhmakeparser.y | 2 | ||||
-rw-r--r-- | tools/mhmake/src/util.h | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/tools/mhmake/src/mhmakefileparser.cpp b/tools/mhmake/src/mhmakefileparser.cpp index 5236d58ee..8c75f78f7 100644 --- a/tools/mhmake/src/mhmakefileparser.cpp +++ b/tools/mhmake/src/mhmakefileparser.cpp @@ -918,6 +918,7 @@ bool mhmakefileparser::SkipHeaderFile(const string &FileName) ///////////////////////////////////////////////////////////////////////////////
void mhmakefileparser::SetExport(const string &Var, const string &Val)
{
+ m_Exports.insert(Var);
#ifdef WIN32
if (!m_pEnv)
{
@@ -1170,6 +1171,20 @@ void mhmakefileparser::CreateUSED_ENVVARS() It++;
}
+ It=m_Exports.begin();
+ ItEnd=m_Exports.end();
+
+ while (It!=ItEnd)
+ {
+ string Var=*It;
+ if (!SkipVar(Var))
+ {
+ transform(Var.begin(),Var.end(),Var.begin(),(int(__CDECL *)(int))toupper);
+ Variables.insert(Var);
+ }
+ It++;
+ }
+
map<string,string>::const_iterator CLItEnd=loadedmakefile::sm_Statics.m_GlobalCommandLineVars.end();
map<string,string>::const_iterator CLIt=loadedmakefile::sm_Statics.m_GlobalCommandLineVars.begin();
while (CLIt!=CLItEnd)
diff --git a/tools/mhmake/src/mhmakefileparser.h b/tools/mhmake/src/mhmakefileparser.h index 19bb403e3..6ae19bf62 100644 --- a/tools/mhmake/src/mhmakefileparser.h +++ b/tools/mhmake/src/mhmakefileparser.h @@ -95,6 +95,7 @@ protected: bool m_RebuildAll; /* true when to rebuild all targets of this makefile */
set<string> m_UsedEnvVars; // Array containing a list of variables that are taken from the environment (This is used for rebuild checking)
+ set<string> m_Exports; // Array containing a list of exported variables in the makefile (This is used for rebuild checking)
#ifdef WIN32
char *m_pEnv; // New environment in case the makefile exports variables
#else
diff --git a/tools/mhmake/src/mhmakeparser.y b/tools/mhmake/src/mhmakeparser.y index c11c84319..107194d70 100644 --- a/tools/mhmake/src/mhmakeparser.y +++ b/tools/mhmake/src/mhmakeparser.y @@ -190,7 +190,7 @@ imvarassignment: STRING IMEQUAL maybeemptyexpression pvarassignment: STRING PEQUAL maybeemptyexpression
{
m_Variables[$1]=m_Variables[$1]+g_SpaceString+$3;
- PRINTF(("Setting variable %s to %s\n",$1.c_str(), $3.c_str()));
+ PRINTF(("Adding to variable %s: %s\n",$1.c_str(), $3.c_str()));
}
;
diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h index 6e8e7c9eb..9b49cf489 100644 --- a/tools/mhmake/src/util.h +++ b/tools/mhmake/src/util.h @@ -50,7 +50,7 @@ #define PLATFORM "linux"
#endif
-#define MHMAKEVER "2.2.4"
+#define MHMAKEVER "2.2.5"
class makecommand
{
|