summaryrefslogtreecommitdiff
path: root/qmake/generators/unix/unixmake2.cpp
Unidiff
Diffstat (limited to 'qmake/generators/unix/unixmake2.cpp') (more/less context) (show whitespace changes)
-rw-r--r--qmake/generators/unix/unixmake2.cpp149
1 files changed, 104 insertions, 45 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 9bb6f6b..7fbb9f4 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -78,13 +78,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
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 QString os = project->variables()["QMAKESPEC"].first().section( '-', 0, 0 );
85 84
86 t << "####### Compiler, tools and options" << endl << endl; 85 t << "####### Compiler, tools and options" << endl << endl;
87 t << "CC = "; 86 t << "CC = ";
88 if (project->isActiveConfig("thread") && 87 if (project->isActiveConfig("thread") &&
89 ! project->variables()["QMAKE_CC_THREAD"].isEmpty()) 88 ! project->variables()["QMAKE_CC_THREAD"].isEmpty())
90 t << var("QMAKE_CC_THREAD") << endl; 89 t << var("QMAKE_CC_THREAD") << endl;
@@ -105,13 +104,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
105 << varGlue("DEFINES","-D"," -D","") << endl; 104 << varGlue("DEFINES","-D"," -D","") << endl;
106 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " " 105 t << "CXXFLAGS = " << var("QMAKE_CXXFLAGS") << " "
107 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " " 106 << varGlue("PRL_EXPORT_DEFINES","-D"," -D","") << " "
108 << varGlue("DEFINES","-D"," -D","") << endl; 107 << varGlue("DEFINES","-D"," -D","") << endl;
109 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl; 108 t << "LEXFLAGS = " << var("QMAKE_LEXFLAGS") << endl;
110 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl; 109 t << "YACCFLAGS= " << var("QMAKE_YACCFLAGS") << endl;
111 t << "INCPATH = " << varGlue("INCLUDEPATH","-I", " -I", "") << " -I" << specdir() << endl; 110 t << "INCPATH = " << "-I" << specdir();
111 if(!project->isActiveConfig("no_include_pwd")) {
112 QString pwd = fileFixify(QDir::currentDirPath());
113 if(pwd.isEmpty())
114 pwd = ".";
115 t << " -I" << pwd;
116 }
117 t << varGlue("INCLUDEPATH"," -I", " -I", "") << endl;
112 118
113 if(!project->isActiveConfig("staticlib")) { 119 if(!project->isActiveConfig("staticlib")) {
114 t << "LINK = "; 120 t << "LINK = ";
115 if (project->isActiveConfig("thread") && 121 if (project->isActiveConfig("thread") &&
116 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty()) 122 ! project->variables()["QMAKE_LINK_THREAD"].isEmpty())
117 t << var("QMAKE_LINK_THREAD") << endl; 123 t << var("QMAKE_LINK_THREAD") << endl;
@@ -133,13 +139,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
133 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl; 139 t << "COPY_FILE= " << var("QMAKE_COPY_FILE") << endl;
134 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl; 140 t << "COPY_DIR = " << var("QMAKE_COPY_DIR") << endl;
135 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl; 141 t << "DEL_FILE = " << var("QMAKE_DEL_FILE") << endl;
136 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl; 142 t << "SYMLINK = " << var("QMAKE_SYMBOLIC_LINK") << endl;
137 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl; 143 t << "DEL_DIR = " << var("QMAKE_DEL_DIR") << endl;
138 t << "MOVE = " << var("QMAKE_MOVE") << endl; 144 t << "MOVE = " << var("QMAKE_MOVE") << endl;
139 t << "PRO = " << fileFixify(project->projectFile() )<< endl; 145 t << "CHK_DIR_EXISTS= " << var("QMAKE_CHK_DIR_EXISTS") << endl;
146 t << "MKDIR = " << var("QMAKE_MKDIR") << endl;
140 t << endl; 147 t << endl;
141 148
142 t << "####### Output directory" << endl << endl; 149 t << "####### Output directory" << endl << endl;
143 if (! project->variables()["OBJECTS_DIR"].isEmpty()) 150 if (! project->variables()["OBJECTS_DIR"].isEmpty())
144 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl; 151 t << "OBJECTS_DIR = " << var("OBJECTS_DIR") << endl;
145 else 152 else
@@ -209,30 +216,28 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
209 } 216 }
210 } else { 217 } else {
211 t << "OBJMOC = " << objMoc << endl; 218 t << "OBJMOC = " << objMoc << endl;
212 } 219 }
213 if(do_incremental && !moc_incremental && !src_incremental) 220 if(do_incremental && !moc_incremental && !src_incremental)
214 do_incremental = FALSE; 221 do_incremental = FALSE;
215 t << "DIST = " << varList("DISTFILES") << endl; 222 t << "DIST = " << valList(fileFixify(project->variables()["DISTFILES"])) << endl;
216 t << "PRO = " << fileFixify(project->projectFile()) << endl;
217 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; 223 t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
218 t << "DESTDIR = " << var("DESTDIR") << endl; 224 t << "DESTDIR = " << var("DESTDIR") << endl;
219 t << "TARGET = " << var("TARGET") << endl; 225 t << "TARGET = " << var("TARGET") << endl;
220 if(project->isActiveConfig("plugin") ) { 226 if(project->isActiveConfig("plugin") ) {
221 t << "TARGETD = " << var("TARGET") << endl; 227 t << "TARGETD = " << var("TARGET") << endl;
222 } else if (!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty()) { 228 } else if (!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty()) {
223 t << "TARGETA= " << var("TARGETA") << endl; 229 t << "TARGETA= " << var("TARGETA") << endl;
224 if (os == "hpux") { 230 if (project->isEmpty("QMAKE_HPUX_SHLIB")) {
225 t << "TARGETD= " << var("TARGET_x") << endl;
226 t << "TARGET0= " << var("TARGET_") << endl;
227 }
228 else {
229 t << "TARGETD= " << var("TARGET_x.y.z") << endl; 231 t << "TARGETD= " << var("TARGET_x.y.z") << endl;
230 t << "TARGET0= " << var("TARGET_") << endl; 232 t << "TARGET0= " << var("TARGET_") << endl;
231 t << "TARGET1= " << var("TARGET_x") << endl; 233 t << "TARGET1= " << var("TARGET_x") << endl;
232 t << "TARGET2= " << var("TARGET_x.y") << endl; 234 t << "TARGET2= " << var("TARGET_x.y") << endl;
235 } else {
236 t << "TARGETD= " << var("TARGET_x") << endl;
237 t << "TARGET0= " << var("TARGET_") << endl;
233 } 238 }
234 } 239 }
235 t << endl; 240 t << endl;
236 241
237 // blasted incldues 242 // blasted incldues
238 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"]; 243 QStringList &qeui = project->variables()["QMAKE_EXTRA_UNIX_INCLUDES"];
@@ -258,13 +263,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
258 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) 263 if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH"))
259 cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " "; 264 cmd += " -I" + project->first("QMAKE_ABSOLUTE_SOURCE_PATH") + " ";
260 cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", ""); 265 cmd += " $(INCPATH) " + varGlue("DEPENDPATH", "-I", " -I", "");
261 QString odir; 266 QString odir;
262 if(!project->variables()["OBJECTS_DIR"].isEmpty()) 267 if(!project->variables()["OBJECTS_DIR"].isEmpty())
263 odir = project->first("OBJECTS_DIR"); 268 odir = project->first("OBJECTS_DIR");
264 t << "###### Dependancies" << endl << endl; 269 t << "###### Dependencies" << endl << endl;
265 t << odir << ".deps/%.d: %.cpp\n\t" 270 t << odir << ".deps/%.d: %.cpp\n\t"
266 << "@echo Creating depend for $<" << "\n\t" 271 << "@echo Creating depend for $<" << "\n\t"
267 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t" 272 << "@test -d $(@D) || mkdir -p $(@D)" << "\n\t"
268 << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl; 273 << "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@" << endl << endl;
269 274
270 t << odir << ".deps/%.d: %.c\n\t" 275 t << odir << ".deps/%.d: %.c\n\t"
@@ -383,26 +388,28 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
383 incr_deps = "$(UICDECLS) $(OBJECTS) $(OBJMOC)"; 388 incr_deps = "$(UICDECLS) $(OBJECTS) $(OBJMOC)";
384 } 389 }
385 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)" 390 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)"
386 << endl << endl; 391 << endl << endl;
387 392
388 //real target 393 //real target
389 t << var("TARGET") << ": " << " " << incr_deps << " " << var("TARGETDEPS") << "\n\t"; 394 t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps
395 << " " << var("POST_TARGETDEPS") << "\n\t";
390 if(!destdir.isEmpty()) 396 if(!destdir.isEmpty())
391 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 397 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
392 if(!project->isEmpty("QMAKE_PRE_LINK")) 398 if(!project->isEmpty("QMAKE_PRE_LINK"))
393 t << var("QMAKE_PRE_LINK") << "\n\t"; 399 t << var("QMAKE_PRE_LINK") << "\n\t";
394 t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(LIBS)"; 400 t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(LIBS)";
395 if(!project->isEmpty("QMAKE_POST_LINK")) 401 if(!project->isEmpty("QMAKE_POST_LINK"))
396 t << "\n\t" << var("QMAKE_POST_LINK"); 402 t << "\n\t" << var("QMAKE_POST_LINK");
397 t << endl << endl; 403 t << endl << endl;
398 } else { 404 } else {
399 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)" 405 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << "$(TARGET)"
400 << endl << endl; 406 << endl << endl;
401 407
402 t << "$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) " << var("TARGETDEPS") << "\n\t"; 408 t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC) "
409 << var("POST_TARGETDEPS") << "\n\t";
403 if(!destdir.isEmpty()) 410 if(!destdir.isEmpty())
404 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 411 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
405 if(!project->isEmpty("QMAKE_PRE_LINK")) 412 if(!project->isEmpty("QMAKE_PRE_LINK"))
406 t << var("QMAKE_PRE_LINK") << "\n\t"; 413 t << var("QMAKE_PRE_LINK") << "\n\t";
407 t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)"; 414 t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)";
408 if(!project->isEmpty("QMAKE_POST_LINK")) 415 if(!project->isEmpty("QMAKE_POST_LINK"))
@@ -457,19 +464,19 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
457 } 464 }
458 465
459 t << "all: " << " " << deps << " " << varGlue("ALL_DEPS",""," ","") 466 t << "all: " << " " << deps << " " << varGlue("ALL_DEPS",""," ","")
460 << " " << var("DESTDIR_TARGET") << endl << endl; 467 << " " << var("DESTDIR_TARGET") << endl << endl;
461 468
462 //real target 469 //real target
463 t << var("DESTDIR_TARGET") << ": " << incr_deps << " $(SUBLIBS) " << 470 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS") << " "
464 var("TARGETDEPS"); 471 << incr_deps << " $(SUBLIBS) " << var("POST_TARGETDEPS");
465 } else { 472 } else {
466 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," ","") << " " << 473 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," ","") << " " <<
467 var("DESTDIR_TARGET") << endl << endl; 474 var("DESTDIR_TARGET") << endl << endl;
468 t << var("DESTDIR_TARGET") << ": $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) " << 475 t << var("DESTDIR_TARGET") << ": " << var("PRE_TARGETDEPS")
469 var("TARGETDEPS"); 476 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) " << var("POST_TARGETDEPS");
470 } 477 }
471 if(!destdir.isEmpty()) 478 if(!destdir.isEmpty())
472 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir; 479 t << "\n\t" << "test -d " << destdir << " || mkdir -p " << destdir;
473 if(!project->isEmpty("QMAKE_PRE_LINK")) 480 if(!project->isEmpty("QMAKE_PRE_LINK"))
474 t << "\n\t" << var("QMAKE_PRE_LINK"); 481 t << "\n\t" << var("QMAKE_PRE_LINK");
475 482
@@ -480,51 +487,51 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
480 if(!destdir.isEmpty()) 487 if(!destdir.isEmpty())
481 t << "\n\t" 488 t << "\n\t"
482 << "-$(MOVE) $(TARGET) " << var("DESTDIR"); 489 << "-$(MOVE) $(TARGET) " << var("DESTDIR");
483 if(!project->isEmpty("QMAKE_POST_LINK")) 490 if(!project->isEmpty("QMAKE_POST_LINK"))
484 t << "\n\t" << var("QMAKE_POST_LINK") << "\n\t"; 491 t << "\n\t" << var("QMAKE_POST_LINK") << "\n\t";
485 t << endl << endl; 492 t << endl << endl;
486 } else if ( os == "hpux" ) { 493 } else if(project->isEmpty("QMAKE_HPUX_SHLIB")) {
487 t << "\n\t" 494 t << "\n\t"
488 << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t" 495 << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t"
489 << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; 496 << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
490 t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)"); 497 t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t"
498 << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t"
499 << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)");
491 if(!destdir.isEmpty()) 500 if(!destdir.isEmpty())
492 t << "\n\t" 501 t << "\n\t"
493 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)\n\t" 502 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)\n\t"
494 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET0)\n\t" 503 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET0)\n\t"
495 << "-$(MOVE) $(TARGET) $(TARGET0) " << var("DESTDIR"); 504 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET1)\n\t"
505 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET2)\n\t"
506 << "-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) " << var("DESTDIR");
496 if(!project->isEmpty("QMAKE_POST_LINK")) 507 if(!project->isEmpty("QMAKE_POST_LINK"))
497 t << "\n\t" << var("QMAKE_POST_LINK"); 508 t << "\n\t" << var("QMAKE_POST_LINK");
498 t << endl << endl; 509 t << endl << endl;
499 } else { 510 } else {
500 t << "\n\t" 511 t << "\n\t"
501 << "-$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2)" << "\n\t" 512 << "-$(DEL_FILE) $(TARGET) $(TARGET0)" << "\n\t"
502 << var("QMAKE_LINK_SHLIB_CMD") << "\n\t"; 513 << var("QMAKE_LINK_SHLIB_CMD") << "\n\t";
503 t << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET0)") << "\n\t" 514 t << varGlue("QMAKE_LN_SHLIB",""," "," $(TARGET) $(TARGET0)");
504 << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET1)") << "\n\t"
505 << varGlue("QMAKE_LN_SHLIB","-"," "," $(TARGET) $(TARGET2)");
506 if(!destdir.isEmpty()) 515 if(!destdir.isEmpty())
507 t << "\n\t" 516 t << "\n\t"
508 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)\n\t" 517 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)\n\t"
509 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET0)\n\t" 518 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET0)\n\t"
510 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET1)\n\t" 519 << "-$(MOVE) $(TARGET) $(TARGET0) " << var("DESTDIR");
511 << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET2)\n\t"
512 << "-$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) " << var("DESTDIR");
513 if(!project->isEmpty("QMAKE_POST_LINK")) 520 if(!project->isEmpty("QMAKE_POST_LINK"))
514 t << "\n\t" << var("QMAKE_POST_LINK"); 521 t << "\n\t" << var("QMAKE_POST_LINK");
515 t << endl << endl; 522 t << endl << endl;
516 } 523 }
517 t << endl << endl; 524 t << endl << endl;
518 525
519 if (! project->isActiveConfig("plugin")) { 526 if (! project->isActiveConfig("plugin")) {
520 t << "staticlib: $(TARGETA)" << endl << endl; 527 t << "staticlib: $(TARGETA)" << endl << endl;
521 t << "$(TARGETA): $(UICDECLS) $(OBJECTS) $(OBJMOC)"; 528 t << "$(TARGETA): " << var("PRE_TARGETDEPS") << " $(UICDECLS) $(OBJECTS) $(OBJMOC)";
522 if(do_incremental) 529 if(do_incremental)
523 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)"; 530 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)";
524 t << var("TARGETDEPS") << "\n\t" 531 t << var("POST_TARGETDEPS") << "\n\t"
525 << "-$(DEL_FILE) $(TARGETA) " << "\n\t" 532 << "-$(DEL_FILE) $(TARGETA) " << "\n\t"
526 << var("QMAKE_AR_CMD"); 533 << var("QMAKE_AR_CMD");
527 if(do_incremental) 534 if(do_incremental)
528 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)"; 535 t << " $(INCREMENTAL_OBJECTS) $(INCREMENTAL_OBJMOC)";
529 if(!project->isEmpty("QMAKE_RANLIB")) 536 if(!project->isEmpty("QMAKE_RANLIB"))
530 t << "\n\t" << "$(RANLIB) $(TARGETA)"; 537 t << "\n\t" << "$(RANLIB) $(TARGETA)";
@@ -532,13 +539,14 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
532 } 539 }
533 } else { 540 } else {
534 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << var("DESTDIR") << "$(TARGET) " 541 t << "all: " << deps << " " << varGlue("ALL_DEPS",""," "," ") << var("DESTDIR") << "$(TARGET) "
535 << varGlue("QMAKE_AR_SUBLIBS", var("DESTDIR"), " " + var("DESTDIR"), "") << "\n\n" 542 << varGlue("QMAKE_AR_SUBLIBS", var("DESTDIR"), " " + var("DESTDIR"), "") << "\n\n"
536 << "staticlib: " << var("DESTDIR") << "$(TARGET)" << "\n\n"; 543 << "staticlib: " << var("DESTDIR") << "$(TARGET)" << "\n\n";
537 if(project->isEmpty("QMAKE_AR_SUBLIBS")) { 544 if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
538 t << var("DESTDIR") << "$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(TARGETDEPS) " << "\n\t"; 545 t << var("DESTDIR") << "$(TARGET): " << var("PRE_TARGETDEPS")
546 << " $(UICDECLS) $(OBJECTS) $(OBJMOC) " << var("POST_TARGETDEPS") << "\n\t";
539 if(!project->isEmpty("DESTDIR")) { 547 if(!project->isEmpty("DESTDIR")) {
540 QString destdir = project->first("DESTDIR"); 548 QString destdir = project->first("DESTDIR");
541 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t"; 549 t << "test -d " << destdir << " || mkdir -p " << destdir << "\n\t";
542 } 550 }
543 t << "-$(DEL_FILE) $(TARGET)" << "\n\t" 551 t << "-$(DEL_FILE) $(TARGET)" << "\n\t"
544 << var("QMAKE_AR_CMD") << "\n"; 552 << var("QMAKE_AR_CMD") << "\n";
@@ -547,25 +555,25 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
547 if(!project->isEmpty("QMAKE_RANLIB")) 555 if(!project->isEmpty("QMAKE_RANLIB"))
548 t << "\t" << "$(RANLIB) $(TARGET)" << "\n"; 556 t << "\t" << "$(RANLIB) $(TARGET)" << "\n";
549 if(!project->isEmpty("DESTDIR")) 557 if(!project->isEmpty("DESTDIR"))
550 t << "\t" << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)" << "\n" 558 t << "\t" << "-$(DEL_FILE) " << var("DESTDIR") << "$(TARGET)" << "\n"
551 << "\t" << "-$(MOVE) $(TARGET) " << var("DESTDIR") << "\n"; 559 << "\t" << "-$(MOVE) $(TARGET) " << var("DESTDIR") << "\n";
552 } else { 560 } else {
553 int cnt = 0, max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(); 561 int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt();
554 QStringList objs = project->variables()["OBJECTS"] + project->variables()["OBJMOC"], 562 QStringList objs = project->variables()["OBJECTS"] + project->variables()["OBJMOC"],
555 libs = project->variables()["QMAKE_AR_SUBLIBS"]; 563 libs = project->variables()["QMAKE_AR_SUBLIBS"];
556 libs.prepend("$(TARGET)"); 564 libs.prepend("$(TARGET)");
557 for(QStringList::Iterator libit = libs.begin(), objit = objs.begin(); 565 for(QStringList::Iterator libit = libs.begin(), objit = objs.begin();
558 libit != libs.end(); ++libit) { 566 libit != libs.end(); ++libit) {
559 QStringList build; 567 QStringList build;
560 for(cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++) 568 for(int cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++)
561 build << (*objit); 569 build << (*objit);
562 QString ar; 570 QString ar;
563 if((*libit) == "$(TARGET)") { 571 if((*libit) == "$(TARGET)") {
564 t << var("DESTDIR") << "$(TARGET): $(UICDECLS) " << " $(TARGETDEPS) " 572 t << var("DESTDIR") << "$(TARGET): " << var("PRE_TARGETDEPS")
565 << valList(build) << "\n\t"; 573 << " $(UICDECLS) " << var("POST_TARGETDEPS") << valList(build) << "\n\t";
566 ar = project->variables()["QMAKE_AR_CMD"].first(); 574 ar = project->variables()["QMAKE_AR_CMD"].first();
567 ar = ar.replace("$(OBJMOC)", "").replace("$(OBJECTS)", 575 ar = ar.replace("$(OBJMOC)", "").replace("$(OBJECTS)",
568 build.join(" ")); 576 build.join(" "));
569 } else { 577 } else {
570 t << (*libit) << ": " << valList(build) << "\n\t"; 578 t << (*libit) << ": " << valList(build) << "\n\t";
571 ar = "$(AR) " + (*libit) + " " + build.join(" "); 579 ar = "$(AR) " + (*libit) + " " + build.join(" ");
@@ -589,13 +597,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
589 } 597 }
590 598
591 t << "mocables: $(SRCMOC)" << endl << endl; 599 t << "mocables: $(SRCMOC)" << endl << endl;
592 600
593 if(!project->isActiveConfig("no_mocdepend")) { 601 if(!project->isActiveConfig("no_mocdepend")) {
594 //this is an implicity depend on moc, so it will be built if necesary, however 602 //this is an implicity depend on moc, so it will be built if necesary, however
595 //moc itself shouldn't have this dependancy - this is a little kludgy but it is 603 //moc itself shouldn't have this dependency - this is a little kludgy but it is
596 //better than the alternative for now. 604 //better than the alternative for now.
597 QString moc = project->first("QMAKE_MOC"), target = project->first("TARGET"); 605 QString moc = project->first("QMAKE_MOC"), target = project->first("TARGET");
598 fixEnvVariables(target); 606 fixEnvVariables(target);
599 fixEnvVariables(moc); 607 fixEnvVariables(moc);
600 if(target != moc) 608 if(target != moc)
601 t << "$(MOC): \n\t" 609 t << "$(MOC): \n\t"
@@ -650,13 +658,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
650 t << "$(COPY_FILE) --parents " << val(ui_headers) << " " << ddir_c << Option::dir_sep << " && "; 658 t << "$(COPY_FILE) --parents " << val(ui_headers) << " " << ddir_c << Option::dir_sep << " && ";
651 } 659 }
652 t << "( cd `dirname " << ddir_c << "` && " 660 t << "( cd `dirname " << ddir_c << "` && "
653 << "$(TAR) " << var("QMAKE_ORIG_TARGET") << ".tar " << ddir << " && " 661 << "$(TAR) " << var("QMAKE_ORIG_TARGET") << ".tar " << ddir << " && "
654 << "$(GZIP) " << var("QMAKE_ORIG_TARGET") << ".tar ) && " 662 << "$(GZIP) " << var("QMAKE_ORIG_TARGET") << ".tar ) && "
655 << "$(MOVE) `dirname " << ddir_c << "`" << Option::dir_sep << var("QMAKE_ORIG_TARGET") << ".tar.gz . && " 663 << "$(MOVE) `dirname " << ddir_c << "`" << Option::dir_sep << var("QMAKE_ORIG_TARGET") << ".tar.gz . && "
656 << "$(DEL_DIR) " << ddir_c 664 << "$(DEL_FILE) -r " << ddir_c
657 << endl << endl; 665 << endl << endl;
658 666
659 QString clean_targets; 667 QString clean_targets;
660 if(mocAware()) { 668 if(mocAware()) {
661 t << "mocclean:" << "\n"; 669 t << "mocclean:" << "\n";
662 if(!objMoc.isEmpty() || !srcMoc.isEmpty() || moc_incremental) { 670 if(!objMoc.isEmpty() || !srcMoc.isEmpty() || moc_incremental) {
@@ -674,12 +682,51 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
674 if (!var("UICIMPLS").isEmpty() || !var("UICDECLS").isEmpty()) { 682 if (!var("UICIMPLS").isEmpty() || !var("UICDECLS").isEmpty()) {
675 t << "\t-$(DEL_FILE) $(UICIMPLS) $(UICDECLS)" << "\n"; 683 t << "\t-$(DEL_FILE) $(UICIMPLS) $(UICDECLS)" << "\n";
676 clean_targets += " uiclean"; 684 clean_targets += " uiclean";
677 } 685 }
678 t << endl; 686 t << endl;
679 687
688 t << "yaccclean:" << "\n";
689 if(!var("YACCSOURCES").isEmpty()) {
690 QStringList clean, &l = project->variables()["YACCSOURCES"];
691 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
692 QFileInfo fi((*it));
693 QString dir;
694 if(fi.dirPath() != ".")
695 dir = fi.dirPath() + Option::dir_sep;
696 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir);
697 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
698 dir += Option::dir_sep;
699 clean << dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first();
700 clean << dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first();
701 }
702 if(!clean.isEmpty()) {
703 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
704 clean_targets += " yaccclean";
705 }
706 }
707
708 t << "lexclean:" << "\n";
709 if(!var("LEXSOURCES").isEmpty()) {
710 QStringList clean, &l = project->variables()["LEXSOURCES"];
711 for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
712 QFileInfo fi((*it));
713 QString dir;
714 if(fi.dirPath() != ".")
715 dir = fi.dirPath() + Option::dir_sep;
716 dir = fileFixify(dir, QDir::currentDirPath(), Option::output_dir);
717 if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
718 dir += Option::dir_sep;
719 clean << dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first();
720 }
721 if(!clean.isEmpty()) {
722 t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
723 clean_targets += " lexclean";
724 }
725 }
726
680 if(do_incremental) { 727 if(do_incremental) {
681 t << "incrclean:" << "\n"; 728 t << "incrclean:" << "\n";
682 if(src_incremental) 729 if(src_incremental)
683 t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n"; 730 t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJECTS)" << "\n";
684 if(moc_incremental) 731 if(moc_incremental)
685 t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJMOC)" << '\n'; 732 t << "\t-$(DEL_FILE) $(INCREMENTAL_OBJMOC)" << '\n';
@@ -707,14 +754,18 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
707 << var(QString("MAKELIB") + (*it)) << endl << endl; 754 << var(QString("MAKELIB") + (*it)) << endl << endl;
708 } 755 }
709 756
710 QString destdir = project->first("DESTDIR"); 757 QString destdir = project->first("DESTDIR");
711 if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep) 758 if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
712 destdir += Option::dir_sep; 759 destdir += Option::dir_sep;
713 t << "distclean: " << "clean\n\t" 760 t << "distclean: " << "clean\n";
714 << "-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << "$(TARGET)" << "\n"; 761 if(project->first("TEMPLATE") == "app" &&
762 project->isActiveConfig("resource_fork") && !project->isActiveConfig("console"))
763 t << "\t-$(DEL_FILE) -r " << destdir.section(Option::dir_sep, 0, -4) << "\n";
764 else
765 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET)" << " " << "$(TARGET)" << "\n";
715 if(!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty() && 766 if(!project->isActiveConfig("staticlib") && project->variables()["QMAKE_APP_FLAG"].isEmpty() &&
716 !project->isActiveConfig("plugin")) 767 !project->isActiveConfig("plugin"))
717 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) " 768 t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
718 << destdir << "$(TARGET2) $(TARGETA)" << "\n"; 769 << destdir << "$(TARGET2) $(TARGETA)" << "\n";
719 t << endl << endl; 770 t << endl << endl;
720 771
@@ -841,13 +892,13 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
841 t << endl; 892 t << endl;
842 } 893 }
843 894
844 writeMakeQmake(t); 895 writeMakeQmake(t);
845 896
846 if(project->isEmpty("SUBDIRS")) { 897 if(project->isEmpty("SUBDIRS")) {
847 t << "all qmake_all distclean install uiclean mocclean clean: FORCE" << endl; 898 t << "all qmake_all distclean install uiclean mocclean lexclean yaccclean clean: FORCE" << endl;
848 } else { 899 } else {
849 t << "all: $(SUBTARGETS)" << endl; 900 t << "all: $(SUBTARGETS)" << endl;
850 t << "qmake_all:"; 901 t << "qmake_all:";
851 for( it.toFirst(); it.current(); ++it) { 902 for( it.toFirst(); it.current(); ++it) {
852 t << " "; 903 t << " ";
853 if(!(*it)->directory.isEmpty()) 904 if(!(*it)->directory.isEmpty())
@@ -859,13 +910,13 @@ UnixMakefileGenerator::writeSubdirs(QTextStream &t, bool direct)
859 if(!(*it)->directory.isEmpty()) 910 if(!(*it)->directory.isEmpty())
860 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; "; 911 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; ";
861 t << "grep \"^qmake_all:\" " << (*it)->makefile 912 t << "grep \"^qmake_all:\" " << (*it)->makefile
862 << " && $(MAKE) -f " << (*it)->makefile << " qmake_all" << "; ) || true"; 913 << " && $(MAKE) -f " << (*it)->makefile << " qmake_all" << "; ) || true";
863 } 914 }
864 t << endl; 915 t << endl;
865 t << "clean uninstall install uiclean mocclean: qmake_all FORCE"; 916 t << "clean uninstall install uiclean mocclean lexclean yaccclean: qmake_all FORCE";
866 for( it.toFirst(); it.current(); ++it) { 917 for( it.toFirst(); it.current(); ++it) {
867 t << "\n\t ( "; 918 t << "\n\t ( ";
868 if(!(*it)->directory.isEmpty()) 919 if(!(*it)->directory.isEmpty())
869 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; "; 920 t << "[ -d " << (*it)->directory << " ] && cd " << (*it)->directory << " ; ";
870 t << "$(MAKE) -f " << (*it)->makefile << " $@" << "; ) || true"; 921 t << "$(MAKE) -f " << (*it)->makefile << " $@" << "; ) || true";
871 } 922 }
@@ -903,24 +954,25 @@ void UnixMakefileGenerator::init2()
903 project->variables()["QMAKE_LFLAGS_SHAPP"] += project->variables()["QMAKE_LFLAGS_SHLIB"]; 954 project->variables()["QMAKE_LFLAGS_SHAPP"] += project->variables()["QMAKE_LFLAGS_SHLIB"];
904 if(!project->variables()["QMAKE_LFLAGS_SONAME"].isEmpty()) 955 if(!project->variables()["QMAKE_LFLAGS_SONAME"].isEmpty())
905 project->variables()["QMAKE_LFLAGS_SONAME"].first() += project->first("TARGET"); 956 project->variables()["QMAKE_LFLAGS_SONAME"].first() += project->first("TARGET");
906 } 957 }
907#endif 958#endif
908 project->variables()["TARGET"].first().prepend(project->first("DESTDIR")); 959 project->variables()["TARGET"].first().prepend(project->first("DESTDIR"));
960 if ( !project->variables()["QMAKE_CYGWIN_EXE"].isEmpty() )
961 project->variables()["TARGET_EXT"].append(".exe");
909 } else if ( project->isActiveConfig("staticlib") ) { 962 } else if ( project->isActiveConfig("staticlib") ) {
910 project->variables()["TARGET"].first().prepend("lib"); 963 project->variables()["TARGET"].first().prepend("lib");
911 project->variables()["TARGET"].first() += ".a"; 964 project->variables()["TARGET"].first() += ".a";
912 if(project->variables()["QMAKE_AR_CMD"].isEmpty()) 965 if(project->variables()["QMAKE_AR_CMD"].isEmpty())
913 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)"); 966 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGET) $(OBJECTS) $(OBJMOC)");
914 } else { 967 } else {
915 project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a"); 968 project->variables()["TARGETA"].append(project->first("DESTDIR") + "lib" + project->first("TARGET") + ".a");
916 if ( !project->variables()["QMAKE_AR_CMD"].isEmpty() ) 969 if ( !project->variables()["QMAKE_AR_CMD"].isEmpty() )
917 project->variables()["QMAKE_AR_CMD"].first().replace("(TARGET)","(TARGETA)"); 970 project->variables()["QMAKE_AR_CMD"].first().replace("(TARGET)","(TARGETA)");
918 else 971 else
919 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGETA) $(OBJECTS) $(OBJMOC)"); 972 project->variables()["QMAKE_AR_CMD"].append("$(AR) $(TARGETA) $(OBJECTS) $(OBJMOC)");
920 QString os = project->variables()["QMAKESPEC"].first().section( '-', 0, 0 );
921 if( project->isActiveConfig("plugin") ) { 973 if( project->isActiveConfig("plugin") ) {
922 project->variables()["TARGET_x.y.z"].append("lib" + 974 project->variables()["TARGET_x.y.z"].append("lib" +
923 project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB")); 975 project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_SHLIB"));
924 if(project->isActiveConfig("lib_version_first")) 976 if(project->isActiveConfig("lib_version_first"))
925 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + 977 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." +
926 project->first("VER_MAJ") + "." + 978 project->first("VER_MAJ") + "." +
@@ -930,22 +982,22 @@ void UnixMakefileGenerator::init2()
930 project->first("QMAKE_EXTENSION_SHLIB") + 982 project->first("QMAKE_EXTENSION_SHLIB") +
931 "." + project->first("VER_MAJ")); 983 "." + project->first("VER_MAJ"));
932 984
933 project->variables()["TARGET"] = project->variables()["TARGET_x.y.z"]; 985 project->variables()["TARGET"] = project->variables()["TARGET_x.y.z"];
934 if(project->isActiveConfig("qt")) 986 if(project->isActiveConfig("qt"))
935 project->variables()["DEFINES"].append("QT_PLUGIN"); 987 project->variables()["DEFINES"].append("QT_PLUGIN");
936 } else if ( os == "hpux" ) { 988 } else if ( !project->isEmpty("QMAKE_HPUX_SHLIB") ) {
937 project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".sl"); 989 project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".sl");
938 if(project->isActiveConfig("lib_version_first")) 990 if(project->isActiveConfig("lib_version_first"))
939 project->variables()["TARGET_x"].append("lib" + project->first("VER_MAJ") + "." + 991 project->variables()["TARGET_x"].append("lib" + project->first("VER_MAJ") + "." +
940 project->first("TARGET")); 992 project->first("TARGET"));
941 else 993 else
942 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + 994 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." +
943 project->first("VER_MAJ")); 995 project->first("VER_MAJ"));
944 project->variables()["TARGET"] = project->variables()["TARGET_x"]; 996 project->variables()["TARGET"] = project->variables()["TARGET_x"];
945 } else if ( os == "aix" ) { 997 } else if ( !project->isEmpty("QMAKE_AIX_SHLIB") ) {
946 project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".a"); 998 project->variables()["TARGET_"].append("lib" + project->first("TARGET") + ".a");
947 if(project->isActiveConfig("lib_version_first")) { 999 if(project->isActiveConfig("lib_version_first")) {
948 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." + 1000 project->variables()["TARGET_x"].append("lib" + project->first("TARGET") + "." +
949 project->first("VER_MAJ") + "." + 1001 project->first("VER_MAJ") + "." +
950 project->first("QMAKE_EXTENSION_SHLIB")); 1002 project->first("QMAKE_EXTENSION_SHLIB"));
951 project->variables()["TARGET_x.y"].append("lib" + project->first("TARGET") + "." + 1003 project->variables()["TARGET_x.y"].append("lib" + project->first("TARGET") + "." +
@@ -1008,14 +1060,21 @@ void UnixMakefileGenerator::init2()
1008 } 1060 }
1009 if(project->isEmpty("QMAKE_LN_SHLIB")) 1061 if(project->isEmpty("QMAKE_LN_SHLIB"))
1010 project->variables()["QMAKE_LN_SHLIB"].append("ln -s"); 1062 project->variables()["QMAKE_LN_SHLIB"].append("ln -s");
1011 project->variables()["DESTDIR_TARGET"].append("$(TARGET)"); 1063 project->variables()["DESTDIR_TARGET"].append("$(TARGET)");
1012 if ( !project->variables()["DESTDIR"].isEmpty() ) 1064 if ( !project->variables()["DESTDIR"].isEmpty() )
1013 project->variables()["DESTDIR_TARGET"].first().prepend(project->first("DESTDIR")); 1065 project->variables()["DESTDIR_TARGET"].first().prepend(project->first("DESTDIR"));
1014 if ( !project->variables()["QMAKE_LFLAGS_SONAME"].isEmpty() && !project->variables()["TARGET_x"].isEmpty() ) 1066 if ( !project->variables()["QMAKE_LFLAGS_SONAME"].isEmpty()) {
1067 if(project->isActiveConfig("plugin")) {
1068 if(!project->variables()["TARGET"].isEmpty() )
1069 project->variables()["QMAKE_LFLAGS_SONAME"].first() += project->first("TARGET");
1070 } else {
1071 if(!project->variables()["TARGET_x"].isEmpty() )
1015 project->variables()["QMAKE_LFLAGS_SONAME"].first() += project->first("TARGET_x"); 1072 project->variables()["QMAKE_LFLAGS_SONAME"].first() += project->first("TARGET_x");
1073 }
1074 }
1016 if ( project->variables()["QMAKE_LINK_SHLIB_CMD"].isEmpty() ) 1075 if ( project->variables()["QMAKE_LINK_SHLIB_CMD"].isEmpty() )
1017 project->variables()["QMAKE_LINK_SHLIB_CMD"].append( 1076 project->variables()["QMAKE_LINK_SHLIB_CMD"].append(
1018 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)"); 1077 "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS)");
1019 } 1078 }
1020 if(project->isEmpty("QMAKE_SYMBOLIC_LINK")) 1079 if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
1021 project->variables()["QMAKE_SYMBOLIC_LINK"].append("ln -sf"); 1080 project->variables()["QMAKE_SYMBOLIC_LINK"].append("ln -sf");