summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/generators/unix/unixmake2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 7fbb9f4..d8a4a0d 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -17,256 +17,257 @@
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 37
38#include "unixmake.h" 38#include "unixmake.h"
39#include "option.h" 39#include "option.h"
40#include <qregexp.h> 40#include <qregexp.h>
41#include <qfile.h> 41#include <qfile.h>
42#include <qdir.h> 42#include <qdir.h>
43#include <time.h> 43#include <time.h>
44 44
45 45
46UnixMakefileGenerator::UnixMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE) 46UnixMakefileGenerator::UnixMakefileGenerator(QMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE)
47{ 47{
48 48
49} 49}
50 50
51bool 51bool
52UnixMakefileGenerator::writeMakefile(QTextStream &t) 52UnixMakefileGenerator::writeMakefile(QTextStream &t)
53{ 53{
54 writeHeader(t); 54 writeHeader(t);
55 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) { 55 if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
56 t << "all clean:" << "\n\t" 56 t << "all clean:" << "\n\t"
57 << "@echo \"Some of the required modules (" 57 << "@echo \"Some of the required modules ("
58 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t" 58 << var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
59 << "@echo \"Skipped.\"" << endl << endl; 59 << "@echo \"Skipped.\"" << endl << endl;
60 writeMakeQmake(t); 60 writeMakeQmake(t);
61 return TRUE; 61 return TRUE;
62 } 62 }
63 63
64 if (project->variables()["TEMPLATE"].first() == "app" || 64 if (project->variables()["TEMPLATE"].first() == "app" ||
65 project->variables()["TEMPLATE"].first() == "lib") { 65 project->variables()["TEMPLATE"].first() == "lib") {
66 writeMakeParts(t); 66 writeMakeParts(t);
67 return MakefileGenerator::writeMakefile(t); 67 return MakefileGenerator::writeMakefile(t);
68 } else if(project->variables()["TEMPLATE"].first() == "subdirs") { 68 } else if(project->variables()["TEMPLATE"].first() == "subdirs") {
69 writeSubdirs(t); 69 writeSubdirs(t);
70 return TRUE; 70 return TRUE;
71 } 71 }
72 return FALSE; 72 return FALSE;
73} 73}
74 74
75void 75void
76UnixMakefileGenerator::writeMakeParts(QTextStream &t) 76UnixMakefileGenerator::writeMakeParts(QTextStream &t)
77{ 77{
78 QString deps = fileFixify(Option::output.name()), prl; 78 QString deps = fileFixify(Option::output.name()), prl;
79 bool do_incremental = (project->isActiveConfig("incremental") && 79 bool do_incremental = (project->isActiveConfig("incremental") &&
80 !project->variables()["QMAKE_INCREMENTAL"].isEmpty() && 80 !project->variables()["QMAKE_INCREMENTAL"].isEmpty() &&
81 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() || 81 (!project->variables()["QMAKE_APP_FLAG"].isEmpty() ||
82 !project->isActiveConfig("staticlib"))), 82 !project->isActiveConfig("staticlib"))),
83 src_incremental=FALSE, moc_incremental=FALSE; 83 src_incremental=FALSE, moc_incremental=FALSE;
84 84
85 t << "####### Compiler, tools and options" << endl << endl; 85 t << "####### Compiler, tools and options" << endl << endl;
86 t << "CC = "; 86 t << "CC = ";
87 if (project->isActiveConfig("thread") && 87 if (project->isActiveConfig("thread") &&
88 ! project->variables()["QMAKE_CC_THREAD"].isEmpty()) 88 ! project->variables()["QMAKE_CC_THREAD"].isEmpty())
89 t << var("QMAKE_CC_THREAD") << endl; 89 t << var("QMAKE_CC_THREAD") << endl;
90 else 90 else
91 t << var("QMAKE_CC") << endl; 91 t << var("QMAKE_CC") << endl;
92 92
93 t << "CXX = "; 93 t << "CXX = ";
94 if (project->isActiveConfig("thread") && 94 if (project->isActiveConfig("thread") &&
95 ! project->variables()["QMAKE_CXX_THREAD"].isEmpty()) 95 ! project->variables()["QMAKE_CXX_THREAD"].isEmpty())
96 t << var("QMAKE_CXX_THREAD") << endl; 96 t << var("QMAKE_CXX_THREAD") << endl;
97 else 97 else
98 t << var("QMAKE_CXX") << endl; 98 t << var("QMAKE_CXX") << endl;
99 99
100 t << "LEX = " << var("QMAKE_LEX") << endl; 100 t << "LEX = " << var("QMAKE_LEX") << endl;
101 t << "YACC = " << var("QMAKE_YACC") << endl; 101 t << "YACC = " << var("QMAKE_YACC") << endl;
102 t << "CFLAGS = " << var("QMAKE_CFLAGS") << " " 102 t << "CFLAGS = " << var("QMAKE_CFLAGS") << " "
103 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " " 103 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
104 << varGlue("DEFINES","-D"," -D","") << endl; 104 << varGlue("DEFINES","-D"," -D","") << endl;
105 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " " 105 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " "
106 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " " 106 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
107 << varGlue("DEFINES","-D"," -D","") << endl; 107 << varGlue("DEFINES","-D"," -D","") << endl;
108 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; 108 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl;
109 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl; 109 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl;
110 t << "INCPATH = " << "-I" << specdir(); 110 t << "INCPATH = " << "-I" << specdir();
111 if(!project->isActiveConfig("no_include_pwd")) { 111 if(!project->isActiveConfig("no_include_pwd")) {
112 QString pwd = fileFixify(QDir::currentDirPath()); 112 QString pwd = fileFixify(QDir::currentDirPath());
113 if(pwd.isEmpty()) 113 if(pwd.isEmpty())
114 pwd = "."; 114 pwd = ".";
115 t << " -I" << pwd; 115 t << " -I" << pwd;
116 } 116 }
117 t << varGlue("INCLUDEPATH"," -I", " -I", "") << endl; 117 t << varGlue("INCLUDEPATH"," -I", " -I", "") << endl;
118 118
119 if(!project->isActiveConfig("staticlib")) { 119 if(!project->isActiveConfig("staticlib")) {
120 t << "LINK = "; 120 t << "LINK = ";
121 if (project->isActiveConfig("thread") && 121 if (project->isActiveConfig("thread") &&
122 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty()) 122 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty())
123 t << var("QMAKE_LINK_THREAD") << endl; 123 t << var("QMAKE_LINK_THREAD") << endl;
124 else 124 else
125 t << var("QMAKE_LINK") << endl; 125 t << var("QMAKE_LINK") << endl;
126 126
127 t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl; 127 t << "LFLAGS = " << var("QMAKE_LFLAGS") << endl;
128 t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl; 128 t << "LIBS = " << "$(SUBLIBS) " << var("QMAKE_LIBDIR_FLAGS") << " " << var("QMAKE_LIBS") << endl;
129 } 129 }
130 130
131 t << "AR = " << var("QMAKE_AR") << endl; 131 t << "AR = " << var("QMAKE_AR") << endl;
132 t << "RANLIB = " << var("QMAKE_RANLIB") << endl; 132 t << "RANLIB = " << var("QMAKE_RANLIB") << endl;
133 t << "MOC = " << var("QMAKE_MOC") << endl; 133 t << "MOC = " << var("QMAKE_MOC") << endl;
134 t << "UIC = "<< var("QMAKE_UIC") << endl; 134 t << "UIC = "<< var("QMAKE_UIC") << endl;
135 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl; 135 t << "QMAKE = "<< (project->isEmpty("QMAKE_QMAKE") ? QString("qmake") : var("QMAKE_QMAKE")) << endl;
136 t << "TAR = "<< var("QMAKE_TAR") << endl; 136 t << "TAR = "<< var("QMAKE_TAR") << endl;
137 t << "GZIP = " << var("QMAKE_GZIP") << endl; 137 t << "GZIP = " << var("QMAKE_GZIP") << endl;
138 t << "COPY = " << var("QMAKE_COPY") << endl; 138 t << "COPY = " << var("QMAKE_COPY") << endl;
139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl; 139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl;
140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
144 t << "MOVE = " << var("QMAKE_MOVE") << endl; 144 t << "MOVE = " << var("QMAKE_MOVE") << endl;
145 t << "PRO = " << fileFixify(project->projectFile() )<< endl;
145 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl; 146 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
146 t << "MKDIR = " << var("QMAKE_MKDIR") << endl; 147 t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
147 t << endl; 148 t << endl;
148 149
149 t << "####### Output directory" << endl << endl; 150 t << "####### Output directory" << endl << endl;
150 if (! project->variables()["OBJECTS_DIR"].isEmpty()) 151 if (! project->variables()["OBJECTS_DIR"].isEmpty())
151 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl; 152 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl;
152 else 153 else
153 t << "OBJECTS_DIR = ./" << endl; 154 t << "OBJECTS_DIR = ./" << endl;
154 t << endl; 155 t << endl;
155 156
156 /* files */ 157 /* files */
157 t << "####### Files" << endl << endl; 158 t << "####### Files" << endl << endl;
158 t << "HEADERS = " << varList("HEADERS") << endl; 159 t << "HEADERS = " << varList("HEADERS") << endl;
159 t << "SOURCES = " << varList("SOURCES") << endl; 160 t << "SOURCES = " << varList("SOURCES") << endl;
160 if(do_incremental) { 161 if(do_incremental) {
161 QStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; 162 QStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
162 t << "OBJECTS = "; 163 t << "OBJECTS = ";
163 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { 164 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
164 bool increment = FALSE; 165 bool increment = FALSE;
165 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { 166 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
166 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) { 167 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) {
167 increment = TRUE; 168 increment = TRUE;
168 incrs_out.append((*objit)); 169 incrs_out.append((*objit));
169 break; 170 break;
170 } 171 }
171 } 172 }
172 if(!increment) 173 if(!increment)
173 t << "\\\n\t\t" << (*objit); 174 t << "\\\n\t\t" << (*objit);
174 } 175 }
175 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! 176 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done!
176 t << incrs_out.join(" \\\n\t\t") << endl; 177 t << incrs_out.join(" \\\n\t\t") << endl;
177 } else if(!incrs_out.count()) { 178 } else if(!incrs_out.count()) {
178 t << endl; 179 t << endl;
179 } else { 180 } else {
180 src_incremental = TRUE; 181 src_incremental = TRUE;
181 t << endl; 182 t << endl;
182 t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl; 183 t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl;
183 } 184 }
184 } else { 185 } else {
185 t << "OBJECTS = " << varList("OBJECTS") << endl; 186 t << "OBJECTS = " << varList("OBJECTS") << endl;
186 } 187 }
187 t << "FORMS = " << varList("FORMS") << endl; 188 t << "FORMS = " << varList("FORMS") << endl;
188 t << "UICDECLS = " << varList("UICDECLS") << endl; 189 t << "UICDECLS = " << varList("UICDECLS") << endl;
189 t << "UICIMPLS = " << varList("UICIMPLS") << endl; 190 t << "UICIMPLS = " << varList("UICIMPLS") << endl;
190 QString srcMoc = varList("SRCMOC"), objMoc = varList("OBJMOC"); 191 QString srcMoc = varList("SRCMOC"), objMoc = varList("OBJMOC");
191 t << "SRCMOC = " << srcMoc << endl; 192 t << "SRCMOC = " << srcMoc << endl;
192 if(do_incremental) { 193 if(do_incremental) {
193 QStringList &objs = project->variables()["OBJMOC"], 194 QStringList &objs = project->variables()["OBJMOC"],
194 &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out; 195 &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
195 t << "OBJMOC = "; 196 t << "OBJMOC = ";
196 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) { 197 for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
197 bool increment = FALSE; 198 bool increment = FALSE;
198 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) { 199 for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
199 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) { 200 if((*objit).find(QRegExp((*incrit), TRUE, TRUE)) != -1) {
200 increment = TRUE; 201 increment = TRUE;
201 incrs_out.append((*objit)); 202 incrs_out.append((*objit));
202 break; 203 break;
203 } 204 }
204 } 205 }
205 if(!increment) 206 if(!increment)
206 t << "\\\n\t\t" << (*objit); 207 t << "\\\n\t\t" << (*objit);
207 } 208 }
208 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done! 209 if(incrs_out.count() == objs.count()) { //we just switched places, no real incrementals to be done!
209 t << incrs_out.join(" \\\n\t\t") << endl; 210 t << incrs_out.join(" \\\n\t\t") << endl;
210 } else if(!incrs_out.count()) { 211 } else if(!incrs_out.count()) {
211 t << endl; 212 t << endl;
212 } else { 213 } else {
213 moc_incremental = TRUE; 214 moc_incremental = TRUE;
214 t << endl; 215 t << endl;
215 t << "INCREMENTAL_OBJMOC = " << incrs_out.join(" \\\n\t\t") << endl; 216 t << "INCREMENTAL_OBJMOC = " << incrs_out.join(" \\\n\t\t") << endl;
216 } 217 }
217 } else { 218 } else {
218 t << "OBJMOC = " << objMoc << endl; 219 t << "OBJMOC = " << objMoc << endl;
219 } 220 }
220 if(do_incremental && !moc_incremental && !src_incremental) 221 if(do_incremental && !moc_incremental && !src_incremental)
221 do_incremental = FALSE; 222 do_incremental = FALSE;
222 t << "DIST = " << valList(fileFixify(project->variables()["DISTFILES"])) << endl; 223 t << "DIST = " << valList(fileFixify(project->variables()["DISTFILES"])) << endl;
223 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; 224 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
224 t << "DESTDIR = " << var("DESTDIR") << endl; 225 t << "DESTDIR = " << var("DESTDIR") << endl;
225 t << "TARGET = " << var("TARGET") << endl; 226 t << "TARGET = " << var("TARGET") << endl;
226 if(project->isActiveConfig("plugin") ) { 227 if(project->isActiveConfig("plugin") ) {
227 t << "TARGETD = " << var("TARGET") << endl; 228 t << "TARGETD = " << var("TARGET") << endl;
228 } else if (!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty()) { 229 } else if (!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty()) {
229 t << "TARGETA= " << var("TARGETA") << endl; 230 t << "TARGETA= " << var("TARGETA") << endl;
230 if (project->isEmpty("QMAKE_HPUX_SHLIB")) { 231 if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
231 t << "TARGETD= " << var("TARGET_x.y.z") << endl; 232 t << "TARGETD= " << var("TARGET_x.y.z") << endl;
232 t << "TARGET0= " << var("TARGET_") << endl; 233 t << "TARGET0= " << var("TARGET_") << endl;
233 t << "TARGET1= " << var("TARGET_x") << endl; 234 t << "TARGET1= " << var("TARGET_x") << endl;
234 t << "TARGET2= " << var("TARGET_x.y") << endl; 235 t << "TARGET2= " << var("TARGET_x.y") << endl;
235 } else { 236 } else {
236 t << "TARGETD= " << var("TARGET_x") << endl; 237 t << "TARGETD= " << var("TARGET_x") << endl;
237 t << "TARGET0= " << var("TARGET_") << endl; 238 t << "TARGET0= " << var("TARGET_") << endl;
238 } 239 }
239 } 240 }
240 t << endl; 241 t << endl;
241 242
242 // blasted incldues 243 // blasted incldues
243 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"]; 244 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"];
244 QStringList::Iterator it; 245 QStringList::Iterator it;
245 for( it = qeui.begin(); it != qeui.end(); ++it) 246 for( it = qeui.begin(); it != qeui.end(); ++it)
246 t << "include " << (*it) << endl; 247 t << "include " << (*it) << endl;
247 248
248 /* rules */ 249 /* rules */
249 t << "first: all" << endl; 250 t << "first: all" << endl;
250 t << "####### Implicit rules" << endl << endl; 251 t << "####### Implicit rules" << endl << endl;
251 t << ".SUFFIXES: .c"; 252 t << ".SUFFIXES: .c";
252 QStringList::Iterator cppit; 253 QStringList::Iterator cppit;
253 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) 254 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
254 t << " " << (*cppit); 255 t << " " << (*cppit);
255 t << endl << endl; 256 t << endl << endl;
256 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) 257 for(cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit)
257 t << (*cppit) << ".o:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl; 258 t << (*cppit) << ".o:\n\t" << var("QMAKE_RUN_CXX_IMP") << endl << endl;
258 t << ".c.o:\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl; 259 t << ".c.o:\n\t" << var("QMAKE_RUN_CC_IMP") << endl << endl;
259 260
260 if(include_deps) { 261 if(include_deps) {
261 QString cmd=var("QMAKE_CFLAGS_DEPS") + " "; 262 QString cmd=var("QMAKE_CFLAGS_DEPS") + " ";
262 cmd += varGlue("DEFINES","-D"," -D","") + varGlue("PRL_EXPORT_DEFINES"," -D"," -D",""); 263 cmd += varGlue("DEFINES","-D"," -D","") + varGlue("PRL_EXPORT_DEFINES"," -D"," -D","");
263 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) 264 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
264 cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " "; 265 cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " ";
265 cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", ""); 266 cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", "");
266 QString odir; 267 QString odir;
267 if(!project->variables()["OBJECTS_DIR"].isEmpty()) 268 if(!project->variables()["OBJECTS_DIR"].isEmpty())
268 odir = project->first("OBJECTS_DIR"); 269 odir = project->first("OBJECTS_DIR");
269 t << "###### Dependencies" << endl << endl; 270 t << "###### Dependencies" << endl << endl;
270 t << odir << ".deps/%.d: %.cpp\n\t" 271 t << odir << ".deps/%.d: %.cpp\n\t"
271 << "@echo Creating depend for $<" << "\n\t" 272 << "@echo Creating depend for $<" << "\n\t"
272 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t" 273 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t"