summaryrefslogtreecommitdiff
path: root/qmake/generators/makefile.h
authorllornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
committer llornkcor <llornkcor>2003-07-10 02:40:10 (UTC)
commit155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff)
treee6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/generators/makefile.h
parent86703e8a5527ef114facd02c005b6b3a7e62e263 (diff)
downloadopie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz
opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2
update qmake to 1.05a
Diffstat (limited to 'qmake/generators/makefile.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/generators/makefile.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 1d19d98..4fdabe8 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -1,173 +1,173 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Definition of ________ class. 4** Definition of ________ class.
5** 5**
6** Created : 970521 6** Created : 970521
7** 7**
8** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the network module of the Qt GUI Toolkit. 10** This file is part of the network module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** 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 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition licenses may use this 21** Licensees holding valid Qt Enterprise Edition licenses may use this
22** file in accordance with the Qt Commercial License Agreement provided 22** file in accordance with the Qt Commercial License Agreement provided
23** with the Software. 23** with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37#ifndef __MAKEFILE_H__ 37#ifndef __MAKEFILE_H__
38#define __MAKEFILE_H__ 38#define __MAKEFILE_H__
39 39
40#include "option.h" 40#include "option.h"
41#include "project.h" 41#include "project.h"
42#include <qtextstream.h> 42#include <qtextstream.h>
43 43
44class MakefileGenerator 44class MakefileGenerator
45{ 45{
46 QString spec; 46 QString spec;
47 bool init_opath_already, init_already, moc_aware, no_io; 47 bool init_opath_already, init_already, moc_aware, no_io;
48 QStringList createObjectList(const QString &var); 48 QStringList createObjectList(const QString &var);
49 QString build_args(); 49 QString build_args();
50 QMap<QString, QString> depHeuristics, depKeyMap; 50 QMap<QString, QString> depHeuristics, depKeyMap, fileFixed;
51 QMap<QString, QString> mocablesToMOC, mocablesFromMOC; 51 QMap<QString, QString> mocablesToMOC, mocablesFromMOC;
52 QMap<QString, QStringList> depends; 52 QMap<QString, QStringList> depends;
53 53
54protected: 54protected:
55 void writeObj(QTextStream &, const QString &obj, const QString &src); 55 void writeObj(QTextStream &, const QString &obj, const QString &src);
56 void writeUicSrc(QTextStream &, const QString &ui); 56 void writeUicSrc(QTextStream &, const QString &ui);
57 void writeMocObj(QTextStream &, const QString &obj, const QString &src); 57 void writeMocObj(QTextStream &, const QString &obj, const QString &src);
58 void writeMocSrc(QTextStream &, const QString &src); 58 void writeMocSrc(QTextStream &, const QString &src);
59 void writeLexSrc(QTextStream &, const QString &lex); 59 void writeLexSrc(QTextStream &, const QString &lex);
60 void writeYaccSrc(QTextStream &, const QString &yac); 60 void writeYaccSrc(QTextStream &, const QString &yac);
61 void writeInstalls(QTextStream &t, const QString &installs); 61 void writeInstalls(QTextStream &t, const QString &installs);
62 void writeImageObj(QTextStream &t, const QString &obj); 62 void writeImageObj(QTextStream &t, const QString &obj);
63 void writeImageSrc(QTextStream &t, const QString &images); 63 void writeImageSrc(QTextStream &t, const QString &images);
64 64
65protected: 65protected:
66 66
67 QMakeProject *project; 67 QMakeProject *project;
68 68
69 class MakefileDependDir { 69 class MakefileDependDir {
70 public: 70 public:
71 MakefileDependDir(QString r, QString l) : real_dir(r), local_dir(l) { } 71 MakefileDependDir(const QString &r, const QString &l) : real_dir(r), local_dir(l) { }
72 QString real_dir, local_dir; 72 QString real_dir, local_dir;
73 }; 73 };
74 bool generateDependencies(QPtrList<MakefileDependDir> &dirs, QString x, bool recurse); 74 bool generateDependencies(QPtrList<MakefileDependDir> &dirs, const QString &x, bool recurse);
75 75
76 QString buildArgs(); 76 QString buildArgs();
77 77
78 QString specdir(); 78 QString specdir();
79 QString cleanFilePath(const QString &file) const; 79 QString cleanFilePath(const QString &file) const;
80 bool generateMocList(QString fn); 80 bool generateMocList(const QString &fn);
81 81
82 QString findMocSource(const QString &moc_file) const; 82 QString findMocSource(const QString &moc_file) const;
83 QString findMocDestination(const QString &src_file) const; 83 QString findMocDestination(const QString &src_file) const;
84 QStringList &findDependencies(const QString &file); 84 QStringList &findDependencies(const QString &file);
85 85
86 void setNoIO(bool o); 86 void setNoIO(bool o);
87 bool noIO() const; 87 bool noIO() const;
88 88
89 void setMocAware(bool o); 89 void setMocAware(bool o);
90 bool mocAware() const; 90 bool mocAware() const;
91 void logicWarn(const QString &, const QString &); 91 void logicWarn(const QString &, const QString &);
92 92
93 virtual bool doDepends() const { return Option::mkfile::do_deps; } 93 virtual bool doDepends() const { return Option::mkfile::do_deps; }
94 bool writeHeader(QTextStream &); 94 bool writeHeader(QTextStream &);
95 virtual bool writeMakefile(QTextStream &); 95 virtual bool writeMakefile(QTextStream &);
96 virtual bool writeMakeQmake(QTextStream &); 96 virtual bool writeMakeQmake(QTextStream &);
97 void initOutPaths(); 97 void initOutPaths();
98 virtual void init(); 98 virtual void init();
99 99
100 //for installs 100 //for installs
101 virtual QString defaultInstall(const QString &); 101 virtual QString defaultInstall(const QString &);
102 102
103 //for prl 103 //for prl
104 bool processPrlFile(QString &); 104 bool processPrlFile(QString &);
105 virtual void processPrlVariable(const QString &, const QStringList &); 105 virtual void processPrlVariable(const QString &, const QStringList &);
106 virtual void processPrlFiles(); 106 virtual void processPrlFiles();
107 virtual void writePrlFile(QTextStream &); 107 virtual void writePrlFile(QTextStream &);
108 108
109 //make sure libraries are found 109 //make sure libraries are found
110 virtual bool findLibraries(); 110 virtual bool findLibraries();
111 111
112 QString var(const QString &var); 112 QString var(const QString &var);
113 QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after); 113 QString varGlue(const QString &var, const QString &before, const QString &glue, const QString &after);
114 QString varList(const QString &var); 114 QString varList(const QString &var);
115 QString val(const QStringList &varList); 115 QString val(const QStringList &varList);
116 QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after); 116 QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after);
117 QString valList(const QStringList &varList); 117 QString valList(const QStringList &varList);
118 118
119 119
120 QString fileFixify(const QString& file, const QString &out_dir=QString::null, 120 QString fileFixify(const QString& file, const QString &out_dir=QString::null,
121 const QString &in_dir=QString::null, bool force_fix=FALSE) const; 121 const QString &in_dir=QString::null, bool force_fix=FALSE) const;
122 QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null, 122 QStringList fileFixify(const QStringList& files, const QString &out_dir=QString::null,
123 const QString &in_dir=QString::null, bool force_fix=FALSE) const; 123 const QString &in_dir=QString::null, bool force_fix=FALSE) const;
124public: 124public:
125 MakefileGenerator(QMakeProject *p); 125 MakefileGenerator(QMakeProject *p);
126 virtual ~MakefileGenerator(); 126 virtual ~MakefileGenerator();
127 127
128 static MakefileGenerator *create(QMakeProject *); 128 static MakefileGenerator *create(QMakeProject *);
129 bool write(); 129 bool write();
130 virtual bool openOutput(QFile &) const; 130 virtual bool openOutput(QFile &) const;
131}; 131};
132 132
133inline QString MakefileGenerator::findMocSource(const QString &moc_file) const 133inline QString MakefileGenerator::findMocSource(const QString &moc_file) const
134{ 134{
135 QString tmp = cleanFilePath(moc_file); 135 QString tmp = cleanFilePath(moc_file);
136 if (mocablesFromMOC.contains(tmp)) 136 if (mocablesFromMOC.contains(tmp))
137 return mocablesFromMOC[tmp]; 137 return mocablesFromMOC[tmp];
138 else 138 else
139 return QString(""); 139 return QString("");
140} 140}
141 141
142inline QString MakefileGenerator::findMocDestination(const QString &src_file) const 142inline QString MakefileGenerator::findMocDestination(const QString &src_file) const
143{ 143{
144 QString tmp = cleanFilePath(src_file); 144 QString tmp = cleanFilePath(src_file);
145 if (mocablesToMOC.contains(tmp)) 145 if (mocablesToMOC.contains(tmp))
146 return mocablesToMOC[tmp]; 146 return mocablesToMOC[tmp];
147 else 147 else
148 return QString(""); 148 return QString("");
149} 149}
150 150
151inline void MakefileGenerator::setMocAware(bool o) 151inline void MakefileGenerator::setMocAware(bool o)
152{ moc_aware = o; } 152{ moc_aware = o; }
153 153
154inline bool MakefileGenerator::mocAware() const 154inline bool MakefileGenerator::mocAware() const
155{ return moc_aware; } 155{ return moc_aware; }
156 156
157inline void MakefileGenerator::setNoIO(bool o) 157inline void MakefileGenerator::setNoIO(bool o)
158{ no_io = o; } 158{ no_io = o; }
159 159
160inline bool MakefileGenerator::noIO() const 160inline bool MakefileGenerator::noIO() const
161{ return no_io; } 161{ return no_io; }
162 162
163inline QString MakefileGenerator::defaultInstall(const QString &) 163inline QString MakefileGenerator::defaultInstall(const QString &)
164{ return QString(""); } 164{ return QString(""); }
165 165
166inline bool MakefileGenerator::findLibraries() 166inline bool MakefileGenerator::findLibraries()
167{ return TRUE; } 167{ return TRUE; }
168 168
169inline MakefileGenerator::~MakefileGenerator() 169inline MakefileGenerator::~MakefileGenerator()
170{ } 170{ }
171 171
172 172
173#endif /* __MAKEFILE_H__ */ 173#endif /* __MAKEFILE_H__ */