summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.h
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators/makefile.h')
-rw-r--r--qmake/generators/makefile.h39
1 files changed, 22 insertions, 17 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 2753a15e1c..972127916c 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -52,20 +52,6 @@ QT_BEGIN_NAMESPACE
#define QT_PCLOSE pclose
#endif
-struct ReplaceExtraCompilerCacheKey
-{
- mutable uint hash;
- QString var, in, out, pwd;
- ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o);
- bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
- inline uint hashCode() const {
- if(!hash)
- hash = qHash(var) ^ qHash(in) ^ qHash(out) /*^ qHash(pwd)*/;
- return hash;
- }
-};
-inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
-
struct ReplaceExtraCompilerCacheKey;
class MakefileGenerator : protected QMakeSourceFileInfo
@@ -81,6 +67,10 @@ class MakefileGenerator : protected QMakeSourceFileInfo
mutable QHash<QString, QStringList> dependsCache;
mutable QHash<ReplaceExtraCompilerCacheKey, QString> extraCompilerVariablesCache;
+public:
+ // We can't make it visible to VCFilter in VS2008 except by making it public or directly friending it.
+ enum ReplaceFor { NoShell, LocalShell, TargetShell };
+
protected:
enum TARG_MODE { TARG_UNIX_MODE, TARG_MAC_MODE, TARG_WIN_MODE } target_mode;
@@ -132,9 +122,9 @@ protected:
//extra compiler interface
bool verifyExtraCompiler(const ProString &c, const QString &f);
- virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &);
- inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out)
- { return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out)); }
+ virtual QString replaceExtraCompilerVariables(const QString &, const QStringList &, const QStringList &, ReplaceFor forShell);
+ inline QString replaceExtraCompilerVariables(const QString &val, const QString &in, const QString &out, ReplaceFor forShell)
+ { return replaceExtraCompilerVariables(val, QStringList(in), QStringList(out), forShell); }
//interface to the source file info
QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool);
@@ -281,6 +271,21 @@ inline bool MakefileGenerator::findLibraries()
inline MakefileGenerator::~MakefileGenerator()
{ }
+struct ReplaceExtraCompilerCacheKey
+{
+ mutable uint hash;
+ QString var, in, out, pwd;
+ MakefileGenerator::ReplaceFor forShell;
+ ReplaceExtraCompilerCacheKey(const QString &v, const QStringList &i, const QStringList &o, MakefileGenerator::ReplaceFor s);
+ bool operator==(const ReplaceExtraCompilerCacheKey &f) const;
+ inline uint hashCode() const {
+ if (!hash)
+ hash = (uint)forShell ^ qHash(var) ^ qHash(in) ^ qHash(out) /*^ qHash(pwd)*/;
+ return hash;
+ }
+};
+inline uint qHash(const ReplaceExtraCompilerCacheKey &f) { return f.hashCode(); }
+
QT_END_NAMESPACE
#endif // MAKEFILE_H