aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/util.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-12 11:38:41 +0200
committermarha <marha@users.sourceforge.net>2013-09-12 11:40:36 +0200
commit5a54fa6e45ee10cf58ee1b6d2eb5522a24bb8745 (patch)
tree02781984e9417bc04a726fcb7ac6cf17f8169920 /tools/mhmake/src/util.h
parentaf858aeb7348909e334cfd0db0070e1661df00fc (diff)
downloadvcxsrv-5a54fa6e45ee10cf58ee1b6d2eb5522a24bb8745.tar.gz
vcxsrv-5a54fa6e45ee10cf58ee1b6d2eb5522a24bb8745.tar.bz2
vcxsrv-5a54fa6e45ee10cf58ee1b6d2eb5522a24bb8745.zip
Some minor modifications
Ignore pipe symbols when in dependency list Solved some linking problems in linux Solved problem calling svn info when using svn version from cygwin
Diffstat (limited to 'tools/mhmake/src/util.h')
-rw-r--r--tools/mhmake/src/util.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/tools/mhmake/src/util.h b/tools/mhmake/src/util.h
index b1a18c3ed..01e766520 100644
--- a/tools/mhmake/src/util.h
+++ b/tools/mhmake/src/util.h
@@ -50,7 +50,7 @@
#define PLATFORM "linux"
#endif
-#define MHMAKEVER "3.0.21"
+#define MHMAKEVER "3.0.25"
class makecommand
{
@@ -66,6 +66,24 @@ public:
extern makecommand g_MakeCommand;
///////////////////////////////////////////////////////////////////////////////
+inline string unescapeString(const string &InStr)
+{
+ string OutStr;
+ string::const_iterator It=InStr.cbegin();
+ string::const_iterator ItEnd=InStr.cend();
+ while (It!=ItEnd)
+ {
+ char Ch=*It++;
+ if (Ch=='\\' && It!=ItEnd)
+ {
+ Ch=*It++;
+ }
+ OutStr+=Ch;
+ }
+ return OutStr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
inline const char *NextItem(const char *pTmp,string &Output, const char *pToks=" \t")
{
const char *pStart;
@@ -202,6 +220,9 @@ struct loadedmakefile : public refbase
fileinfo *m_MhMakeConf;
loadedmakefile_statics();
+
+ bool GetSvnRevision(void);
+ bool GetGitSvnRevision(void);
};
static loadedmakefile_statics sm_Statics;
@@ -212,6 +233,11 @@ struct loadedmakefile : public refbase
vector<string> m_CommandLineTargets;
refptr<mhmakefileparser> m_pMakefileParser;
+ loadedmakefile()
+ {
+ // Dummy, only used below
+ }
+
loadedmakefile(const fileinfo *pDir, vector<string> &Args,const string &Makefile=g_EmptyString);
void LoadMakefile();
@@ -261,11 +287,22 @@ struct loadedmakefile : public refbase
}
return 1;
}
+public:
+ fileinfo *GetMhMakeConf()
+ {
+ return sm_Statics.m_MhMakeConf;
+ }
+
};
class LOADEDMAKEFILES : public vector<refptr<loadedmakefile> >
{
public:
+ LOADEDMAKEFILES()
+ {
+ loadedmakefile temp;
+ temp.GetMhMakeConf(); // Just to be here to control the order of destruction (sm_Statics may not be destructed before g_LoadedMakefiles)
+ }
refptr<loadedmakefile> find(const loadedmakefile &pToSearch);
typedef vector<refptr<loadedmakefile> >::iterator iterator;
};