author | zecke <zecke> | 2004-07-15 17:36:57 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-15 17:36:57 (UTC) |
commit | 323e9a7472a110b4befba7320540263147505bae (patch) (unidiff) | |
tree | 14c810bdb9c0603a30356b17b4bdf9ccb72741c6 /qmake/generators/makefile.h | |
parent | aa292b322f1ecb43dd8f4e3cd295855730dd9f59 (diff) | |
download | opie-323e9a7472a110b4befba7320540263147505bae.zip opie-323e9a7472a110b4befba7320540263147505bae.tar.gz opie-323e9a7472a110b4befba7320540263147505bae.tar.bz2 |
Manually updatet to qmake1.06a which includes support for precompiled
headers.
Opies 'PRO' keyword was already reintroduced
-rw-r--r-- | qmake/generators/makefile.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 4fdabe8..e818089 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h | |||
@@ -1,13 +1,11 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** |
3 | ** | 3 | ** |
4 | ** Definition of ________ class. | 4 | ** Definition of MakefileGenerator class. |
5 | ** | 5 | ** |
6 | ** Created : 970521 | 6 | ** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. |
7 | ** | 7 | ** |
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | 8 | ** This file is part of qmake. |
9 | ** | ||
10 | ** This file is part of the network module of the Qt GUI Toolkit. | ||
11 | ** | 9 | ** |
12 | ** This file may be distributed under the terms of the Q Public License | 10 | ** This file may be distributed under the terms of the Q Public License |
13 | ** as defined by Trolltech AS of Norway and appearing in the file | 11 | ** as defined by Trolltech AS of Norway and appearing in the file |
@@ -41,13 +39,21 @@ | |||
41 | #include "project.h" | 39 | #include "project.h" |
42 | #include <qtextstream.h> | 40 | #include <qtextstream.h> |
43 | 41 | ||
42 | #ifdef Q_OS_WIN32 | ||
43 | #define QT_POPEN _popen | ||
44 | #else | ||
45 | #define QT_POPEN popen | ||
46 | #endif | ||
47 | |||
44 | class MakefileGenerator | 48 | class MakefileGenerator |
45 | { | 49 | { |
46 | QString spec; | 50 | QString spec; |
47 | bool init_opath_already, init_already, moc_aware, no_io; | 51 | bool init_opath_already, init_already, moc_aware, no_io; |
48 | QStringList createObjectList(const QString &var); | 52 | QStringList createObjectList(const QString &var); |
49 | QString build_args(); | 53 | QString build_args(); |
50 | QMap<QString, QString> depHeuristics, depKeyMap, fileFixed; | 54 | QString dependencyKey(const QString &file) const; |
55 | QMap<QString, bool> depProcessed; | ||
56 | QMap<QString, QString> depHeuristics, fileFixed; | ||
51 | QMap<QString, QString> mocablesToMOC, mocablesFromMOC; | 57 | QMap<QString, QString> mocablesToMOC, mocablesFromMOC; |
52 | QMap<QString, QStringList> depends; | 58 | QMap<QString, QStringList> depends; |
53 | 59 | ||
@@ -81,7 +87,7 @@ protected: | |||
81 | 87 | ||
82 | QString findMocSource(const QString &moc_file) const; | 88 | QString findMocSource(const QString &moc_file) const; |
83 | QString findMocDestination(const QString &src_file) const; | 89 | QString findMocDestination(const QString &src_file) const; |
84 | QStringList &findDependencies(const QString &file); | 90 | virtual QStringList &findDependencies(const QString &file); |
85 | 91 | ||
86 | void setNoIO(bool o); | 92 | void setNoIO(bool o); |
87 | bool noIO() const; | 93 | bool noIO() const; |
@@ -97,6 +103,9 @@ protected: | |||
97 | void initOutPaths(); | 103 | void initOutPaths(); |
98 | virtual void init(); | 104 | virtual void init(); |
99 | 105 | ||
106 | //for cross-platform dependent directories | ||
107 | virtual void usePlatformDir(); | ||
108 | |||
100 | //for installs | 109 | //for installs |
101 | virtual QString defaultInstall(const QString &); | 110 | virtual QString defaultInstall(const QString &); |
102 | 111 | ||
@@ -108,8 +117,12 @@ protected: | |||
108 | 117 | ||
109 | //make sure libraries are found | 118 | //make sure libraries are found |
110 | virtual bool findLibraries(); | 119 | virtual bool findLibraries(); |
120 | virtual QString findDependency(const QString &); | ||
111 | 121 | ||
112 | QString var(const QString &var); | 122 | void setProcessedDependencies(const QString &file, bool b); |
123 | bool processedDependencies(const QString &file); | ||
124 | |||
125 | virtual QString var(const QString &var); | ||
113 | QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after); | 126 | QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after); |
114 | QString varList(const QString &var); | 127 | QString varList(const QString &var); |
115 | QString val(const QStringList &varList); | 128 | QString val(const QStringList &varList); |
@@ -118,15 +131,15 @@ protected: | |||
118 | 131 | ||
119 | 132 | ||
120 | QString fileFixify(const QString& file, const QString &out_dir=QString::null, | 133 | QString fileFixify(const QString& file, const QString &out_dir=QString::null, |
121 | const QString &in_dir=QString::null, bool force_fix=FALSE) const; | 134 | const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const; |
122 | QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null, | 135 | QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null, |
123 | const QString &in_dir=QString::null, bool force_fix=FALSE) const; | 136 | const QString &in_dir=QString::null, bool force_fix=FALSE, bool canon=TRUE) const; |
124 | public: | 137 | public: |
125 | MakefileGenerator(QMakeProject *p); | 138 | MakefileGenerator(QMakeProject *p); |
126 | virtual ~MakefileGenerator(); | 139 | virtual ~MakefileGenerator(); |
127 | 140 | ||
128 | static MakefileGenerator *create(QMakeProject *); | 141 | static MakefileGenerator *create(QMakeProject *); |
129 | bool write(); | 142 | virtual bool write(); |
130 | virtual bool openOutput(QFile &) const; | 143 | virtual bool openOutput(QFile &) const; |
131 | }; | 144 | }; |
132 | 145 | ||
@@ -166,8 +179,12 @@ inline QString MakefileGenerator::defaultInstall(const QString &) | |||
166 | inline bool MakefileGenerator::findLibraries() | 179 | inline bool MakefileGenerator::findLibraries() |
167 | { return TRUE; } | 180 | { return TRUE; } |
168 | 181 | ||
182 | inline QString MakefileGenerator::findDependency(const QString &) | ||
183 | { return QString(""); } | ||
184 | |||
169 | inline MakefileGenerator::~MakefileGenerator() | 185 | inline MakefileGenerator::~MakefileGenerator() |
170 | { } | 186 | { } |
171 | 187 | ||
188 | QString mkdir_p_asstring(const QString &dir); | ||
172 | 189 | ||
173 | #endif /* __MAKEFILE_H__ */ | 190 | #endif /* __MAKEFILE_H__ */ |