Changeset 44 for trunk/qmake/generators/os2/gnumake.cpp
- Timestamp:
- Jun 22, 2009, 12:20:37 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/os2/gnumake.cpp
r42 r44 80 80 if (ret.contains(QRegExp("[ +&;%]"))) 81 81 ret = quote + ret + quote; 82 /* @todo exclude $(var) constructs from quoting like this:83 * $(OBJECTS_DIR)\my file.obj = > $(OBJECTS_DIR)\"my file.obj"84 */85 82 } 86 83 return ret; 87 84 } 88 85 89 QString GNUMakefileGenerator::getLibTarget() 90 { 91 return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".lib"); 86 QString GNUMakefileGenerator::escapeDependencyPath(const QString &path) const 87 { 88 /* dependency escaping is always done Unix-way since this is a requirement 89 * of GNU make which allows " and ' to be part of the file name */ 90 QString ret = path; 91 ret.remove('\"'); 92 ret.replace(' ', "\\ "); 93 return ret; 92 94 } 93 95 … … 137 139 bool GNUMakefileGenerator::writeMakefile(QTextStream &t) 138 140 { 141 142 143 144 145 139 146 writeHeader(t); 147 140 148 if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) { 141 149 t << "all clean:" << "\n\t" … … 351 359 { 352 360 t << "first: all" << endl; 353 t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << " $(DESTDIR_TARGET)"<< endl << endl;354 t << "$(DESTDIR_TARGET): "<< var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");361 t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << << endl << endl; 362 t << << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS"); 355 363 if (!project->isEmpty("QMAKE_PRE_LINK")) 356 364 t << "\n\t" <<var("QMAKE_PRE_LINK"); … … 391 399 t << "DEF_FILE = $(basename $(DESTDIR_TARGET)).def" << endl; 392 400 project->values("QMAKE_CLEAN").append("$(DEF_FILE)"); 393 project->values("POST_TARGETDEPS") += "$(DEF_FILE)";401 project->values("POST_TARGETDEPS") += ; 394 402 if (!project->isEmpty("DEF_FILE_TEMPLATE")) { 395 403 t << "DEF_FILE_TEMPLATE = " << escapeFilePath(var("DEF_FILE_TEMPLATE")) << endl; 396 project->values("QMAKE_GENDEF_DEPS") += "$(DEF_FILE_TEMPLATE)";404 project->values("QMAKE_GENDEF_DEPS") += ; 397 405 } 398 406 if (!project->isEmpty("DEF_FILE_MAP")) { 399 407 t << "DEF_FILE_MAP = " << escapeFilePath(var("DEF_FILE_MAP")) << endl; 400 project->values("QMAKE_GENDEF_DEPS") += "$(DEF_FILE_MAP)";408 project->values("QMAKE_GENDEF_DEPS") += ; 401 409 } 402 410 } … … 408 416 } 409 417 t << "DEF_FILE = " << escapeFilePath(var("DEF_FILE")) << endl; 410 project->values("POST_TARGETDEPS") += "$(DEF_FILE)";418 project->values("POST_TARGETDEPS") += ; 411 419 } 412 420 } … … 416 424 if (!project->isEmpty("RC_FILE") && !project->isEmpty("RES_FILE") && 417 425 !project->isEmpty("QMAKE_RUN_RC2RES")) { 418 t << "$(RES_FILE): $(RC_FILE)\n\t";426 t << ; 419 427 t << var("QMAKE_RUN_RC2RES") << endl; 420 428 } … … 422 430 if (project->isEmpty("DEF_FILE") && mode == DLL) { 423 431 /* generate a DEF file for the DLL when not supplied */ 424 t << "$(DEF_FILE): "<< var("QMAKE_GENDEF_DEPS");432 t << << var("QMAKE_GENDEF_DEPS"); 425 433 t << valGlue(var("QMAKE_RUN_GENDEF").split(";;"), "\n\t", "\n\t", "") << endl; 426 434 } … … 446 454 447 455 if (!project->isEmpty("RES_FILE")) 448 project->values("POST_TARGETDEPS") += "$(RES_FILE)";456 project->values("POST_TARGETDEPS") += ; 449 457 } 450 458 … … 567 575 } 568 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 569 592 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.