Changeset 29
- Timestamp:
- Jun 12, 2009, 1:32:11 PM (16 years ago)
- Location:
- trunk/qmake
- Files:
-
- 10 edited
-
generators/makefile.cpp (modified) (4 diffs)
-
generators/makefile.h (modified) (1 diff)
-
generators/metamakefile.cpp (modified) (2 diffs)
-
generators/os2/gnumake.cpp (modified) (5 diffs)
-
generators/os2/gnumake.h (modified) (1 diff)
-
generators/win32/mingw_make.cpp (modified) (1 diff)
-
generators/win32/mingw_make.h (modified) (1 diff)
-
main.cpp (modified) (2 diffs)
-
option.cpp (modified) (11 diffs)
-
project.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qmake/generators/makefile.cpp
r27 r29 100 100 ret += dir; 101 101 ret += " "; 102 if(is WindowsShell())102 if(isShell()) 103 103 ret += "$(MKDIR)"; 104 104 else … … 125 125 } 126 126 bool ret = true; 127 #if def Q_OS_WIN127 #if 128 128 bool driveExists = true; 129 129 if(!QDir::isRelativePath(path)) { … … 1191 1191 { 1192 1192 QString rm_dir_contents("-$(DEL_FILE)"); 1193 if (!is WindowsShell()) //ick1193 if (!isShell()) //ick 1194 1194 rm_dir_contents = "-$(DEL_FILE) -r"; 1195 1195 … … 1342 1342 for(QStringList::ConstIterator pit = dirs.begin(); pit != dirs.end(); ++pit) { 1343 1343 QString tmp_dst = fileFixify((*pit), FileFixifyAbsolute, false); 1344 if (!is WindowsShell() && tmp_dst.right(1) != Option::dir_sep)1344 if (!isShell() && tmp_dst.right(1) != Option::dir_sep) 1345 1345 tmp_dst += Option::dir_sep; 1346 1346 t << mkdir_p_asstring(filePrefixRoot(root, tmp_dst)) << "\n\t"; -
trunk/qmake/generators/makefile.h
r2 r29 245 245 virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; } 246 246 virtual bool openOutput(QFile &, const QString &build) const; 247 virtual bool isWindowsShell() const { return Option::target_mode == Option::TARG_WIN_MODE; } 247 virtual bool isDosLikeShell() const { return Option::target_mode == Option::TARG_WIN_MODE || 248 Option::target_mode == Option::TARG_OS2_MODE; } 248 249 }; 249 250 -
trunk/qmake/generators/metamakefile.cpp
r2 r29 421 421 #include "unixmake.h" 422 422 #include "mingw_make.h" 423 423 424 #include "projectgenerator.h" 424 425 #include "pbuilder_pbx.h" … … 447 448 } else if(gen == "MINGW") { 448 449 mkfile = new MingwMakefileGenerator; 450 451 449 452 } else if(gen == "PROJECTBUILDER" || gen == "XCODE") { 450 453 mkfile = new ProjectBuilderMakefileGenerator; -
trunk/qmake/generators/os2/gnumake.cpp
r21 r29 60 60 } 61 61 62 bool GNUMakefileGenerator::is WindowsShell() const63 { 64 #ifdef Q_OS_ WIN62 bool GNUMakefileGenerator::isShell() const 63 { 64 #ifdef Q_OS_ 65 65 return Option::shellPath.isEmpty(); 66 66 #else 67 return Win32MakefileGenerator::is WindowsShell();67 return Win32MakefileGenerator::isShell(); 68 68 #endif 69 69 } … … 162 162 } 163 163 164 164 165 void createLdObjectScriptFile(const QString &fileName, const QStringList &objList) 165 166 { … … 199 200 } 200 201 } 202 201 203 202 204 void GNUMakefileGenerator::writeGNUParts(QTextStream &t) … … 368 370 ar_script_file += "." + var("BUILD_NAME"); 369 371 } 372 370 373 createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS")); 374 371 375 objectsLinkLine = "ar -M < " + ar_script_file; 372 376 } else { … … 375 379 ld_script_file += "." + var("BUILD_NAME"); 376 380 } 381 377 382 createLdObjectScriptFile(ld_script_file, project->values("OBJECTS")); 383 378 384 objectsLinkLine = ld_script_file; 379 385 } -
trunk/qmake/generators/os2/gnumake.h
r21 r29 58 58 QString getLibTarget(); 59 59 private: 60 bool is WindowsShell() const;60 bool isShell() const; 61 61 void writeGNUParts(QTextStream &); 62 62 void writeIncPart(QTextStream &t); -
trunk/qmake/generators/win32/mingw_make.cpp
r2 r29 58 58 } 59 59 60 bool MingwMakefileGenerator::is WindowsShell() const60 bool MingwMakefileGenerator::isShell() const 61 61 { 62 62 #ifdef Q_OS_WIN 63 63 return Option::shellPath.isEmpty(); 64 64 #else 65 return Win32MakefileGenerator::is WindowsShell();65 return Win32MakefileGenerator::isShell(); 66 66 #endif 67 67 } -
trunk/qmake/generators/win32/mingw_make.h
r2 r29 56 56 QString getLibTarget(); 57 57 private: 58 bool is WindowsShell() const;58 bool isShell() const; 59 59 void writeMingwParts(QTextStream &); 60 60 void writeIncPart(QTextStream &t); -
trunk/qmake/main.cpp
r2 r29 97 97 QString reporterPath = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator() 98 98 + "qtusagereporter"; 99 #if defined(Q_OS_WIN) 99 #if defined(Q_OS_WIN) 100 100 reporterPath += ".exe"; 101 101 #endif … … 105 105 106 106 QString oldpwd = qmake_getpwd(); 107 #if def Q_WS_WIN107 #if 108 108 if(!(oldpwd.length() == 3 && oldpwd[0].isLetter() && oldpwd.endsWith(":/"))) 109 109 #endif -
trunk/qmake/option.cpp
r27 r29 343 343 } 344 344 345 #if def Q_OS_WIN345 #if 346 346 static QStringList detectShellPath() 347 347 { … … 356 356 } 357 357 return paths; 358 359 360 361 362 363 364 365 358 366 } 359 367 #endif … … 375 383 Option::h_ext << ".h" << ".hpp" << ".hh" << ".hxx"; 376 384 Option::c_ext << ".c"; 377 #if ndef Q_OS_WIN385 #if 378 386 Option::h_ext << ".H"; 379 387 #endif … … 381 389 Option::h_moc_ext = ".cpp"; 382 390 Option::cpp_ext << ".cpp" << ".cc" << ".cxx"; 383 #if ndef Q_OS_WIN391 #if 384 392 Option::cpp_ext << ".C"; 385 393 #endif … … 387 395 Option::yacc_ext = ".y"; 388 396 Option::pro_ext = ".pro"; 389 #if def Q_OS_WIN397 #if 390 398 Option::dirlist_sep = ";"; 391 399 Option::shellPath = detectShellPath(); … … 404 412 Option::qmake_abslocation = argv0; 405 413 } else if (argv0.contains(QLatin1Char('/')) 406 #if def Q_OS_WIN414 #if 407 415 || argv0.contains(QLatin1Char('\\')) 408 416 #endif … … 412 420 QByteArray pEnv = qgetenv("PATH"); 413 421 QDir currentDir = QDir::current(); 414 #if def Q_OS_WIN422 #if 415 423 QStringList paths = QString::fromLocal8Bit(pEnv).split(QLatin1String(";")); 416 424 #else … … 421 429 continue; 422 430 QString candidate = currentDir.absoluteFilePath(*p + QLatin1Char('/') + argv0); 423 #if def Q_OS_WIN431 #if 424 432 candidate += ".exe"; 425 433 #endif … … 625 633 Q_ASSERT(!((flags & Option::FixPathToLocalSeparators) && (flags & Option::FixPathToTargetSeparators))); 626 634 if(flags & Option::FixPathToLocalSeparators) { 627 #if defined(Q_OS_WIN 32)635 #if defined(Q_OS_WIN2) 628 636 string = string.replace('/', '\\'); 629 637 #else … … 719 727 #endif 720 728 729 730 731 732 733 734 721 735 QString qmake_libraryInfoFile() 722 736 { 723 737 QString ret; 724 #if defined( Q_OS_WIN)738 #if defined() 725 739 QFileInfo filePath; 726 740 QT_WA({ … … 733 747 filePath = QString::fromLocal8Bit(module_name); 734 748 }); 749 750 751 752 753 754 755 756 757 758 735 759 ret = filePath.filePath(); 736 760 #else -
trunk/qmake/project.cpp
r28 r29 59 59 #elif defined(Q_OS_WIN32) 60 60 #include <Windows.h> 61 62 61 63 #endif 62 64 #include <stdio.h> … … 3176 3178 } 3177 3179 } 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3178 3211 #elif defined(Q_OS_UNIX) 3179 3212 struct utsname name;
Note:
See TracChangeset
for help on using the changeset viewer.
