Changeset 37
- Timestamp:
- Jun 18, 2009, 12:25:39 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/win32/winmakefile.cpp
r2 r37 486 486 void Win32MakefileGenerator::writeCleanParts(QTextStream &t) 487 487 { 488 const QString del_statement("-$(DEL_FILE)"); 489 const QString del_suffix = 490 Option::target_mode == Option::TARG_OS2_MODE ? 491 QString(" >nul 2>&1"): // reduce noise 492 QString::null; 493 494 const int commandlineLimit = 495 Option::target_mode == Option::TARG_OS2_MODE ? 496 1024: // OS/2 CMD.EXE limit 497 2047; // NT limit, expanded 498 488 499 t << "clean: compiler_clean " << var("CLEAN_DEPS"); 489 500 { … … 491 502 for(int i = 0; clean_targets[i]; ++i) { 492 503 const QStringList &list = project->values(clean_targets[i]); 493 const QString del_statement("-$(DEL_FILE)");494 504 if(project->isActiveConfig("no_delete_multiple_files")) { 495 505 for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) 496 t << "\n\t" << del_statement << " " << escapeFilePath((*it)) ;506 t << "\n\t" << del_statement << " " << escapeFilePath((*it)) << del_suffix; 497 507 } else { 498 508 QString files, file; 499 const int commandlineLimit = 2047; // NT limit, expanded500 509 for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { 501 510 file = " " + escapeFilePath((*it)); 502 511 if(del_statement.length() + files.length() + 503 qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit) { 504 t << "\n\t" << del_statement << files; 512 qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit && 513 !files.isEmpty()) { 514 t << "\n\t" << del_statement << files << del_suffix; 505 515 files.clear(); 506 516 } … … 508 518 } 509 519 if(!files.isEmpty()) 510 t << "\n\t" << del_statement << files ;520 t << "\n\t" << del_statement << files << del_suffix; 511 521 } 512 522 } … … 519 529 for(int i = 0; clean_targets[i]; ++i) { 520 530 const QStringList &list = project->values(clean_targets[i]); 521 const QString del_statement("-$(DEL_FILE)");522 531 if(project->isActiveConfig("no_delete_multiple_files")) { 523 532 for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) 524 t << "\n\t" << del_statement << " " << escapeFilePath((*it)) ;533 t << "\n\t" << del_statement << " " << escapeFilePath((*it)) << del_suffix; 525 534 } else { 526 535 QString files, file; 527 const int commandlineLimit = 2047; // NT limit, expanded528 536 for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { 529 537 file = " " + escapeFilePath((*it)); 530 538 if(del_statement.length() + files.length() + 531 qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit) { 532 t << "\n\t" << del_statement << files; 539 qMax(fixEnvVariables(file).length(), file.length()) > commandlineLimit && 540 !files.isEmpty()) { 541 t << "\n\t" << del_statement << files << del_suffix; 533 542 files.clear(); 534 543 } … … 536 545 } 537 546 if(!files.isEmpty()) 538 t << "\n\t" << del_statement << files ;547 t << "\n\t" << del_statement << files << del_suffix; 539 548 } 540 549 } 541 550 } 542 t << "\n\t -$(DEL_FILE) $(DESTDIR_TARGET)"<< endl;551 t << "\n\t" << del_statement << " $(DESTDIR_TARGET)" << del_suffix << endl; 543 552 { 544 553 QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName())); 545 554 if(!ofile.isEmpty()) 546 t << "\t -$(DEL_FILE) " << ofile<< endl;555 t << "\t" << del_statement << " " << ofile << del_suffix << endl; 547 556 } 548 557 t << endl;
Note:
See TracChangeset
for help on using the changeset viewer.