Changeset 846 for trunk/qmake/generators/metamakefile.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/qmake/generators/metamakefile.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 58 58 delete project; 59 59 } 60 61 #ifndef QT_QMAKE_PARSER_ONLY 60 62 61 63 class BuildsMetaMakefileGenerator : public MetaMakefileGenerator … … 294 296 bool hasError = false; 295 297 296 if(Option::recursive) { 298 // It might make sense to bequeath the CONFIG option to the recursed 299 // projects. OTOH, one would most likely have it in all projects anyway - 300 // either through a qmakespec, a .qmake.cache or explicitly - as otherwise 301 // running qmake in a subdirectory would have a different auto-recurse 302 // setting than in parent directories. 303 bool recurse = Option::recursive == Option::QMAKE_RECURSIVE_YES 304 || (Option::recursive == Option::QMAKE_RECURSIVE_DEFAULT 305 && project->isRecursive()); 306 if(recurse) { 297 307 QString old_output_dir = Option::output_dir; 298 308 QString old_output = Option::output.fileName(); … … 376 386 self->input_dir = qmake_getpwd(); 377 387 self->output_dir = Option::output_dir; 378 if(! Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))388 if(!recurse || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir())) 379 389 self->output_file = Option::output.fileName(); 380 390 self->makefile = new BuildsMetaMakefileGenerator(project, name, false); … … 434 444 #include "msvc_nmake.h" 435 445 #include "borland_bmake.h" 436 #include "msvc_dsp.h"437 446 #include "msvc_vcproj.h" 447 #include "msvc_vcxproj.h" 438 448 #include "symmake_abld.h" 439 449 #include "symmake_sbsv2.h" 450 #include "symbian_makefile.h" 440 451 QT_END_INCLUDE_NAMESPACE 441 452 … … 462 473 } else if(gen == "PROJECTBUILDER" || gen == "XCODE") { 463 474 mkfile = new ProjectBuilderMakefileGenerator; 464 } else if(gen == "MSVC") { 465 // Visual Studio =< v6.0 466 if(proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1) 467 mkfile = new DspMakefileGenerator; 475 } else if(gen == "MSVC.NET") { 476 if (proj->first("TEMPLATE").startsWith("vc")) 477 mkfile = new VcprojGenerator; 468 478 else 469 479 mkfile = new NmakeMakefileGenerator; 470 } else if(gen == "MS VC.NET") {471 // Visual Studio >= v 7.0472 if (proj->first("TEMPLATE").indexOf(QRegExp("^vc.*")) != -1 || proj->first("TEMPLATE").indexOf(QRegExp("^ce.*")) != -1)473 mkfile = new Vc projGenerator;480 } else if(gen == "MSBUILD") { 481 // Visual Studio >= v11.0 482 if (proj->first("TEMPLATE").startsWith("vc")) 483 mkfile = new VcxprojGenerator; 474 484 else 475 485 mkfile = new NmakeMakefileGenerator; … … 480 490 } else if(gen == "SYMBIAN_SBSV2") { 481 491 mkfile = new SymbianSbsv2MakefileGenerator; 492 } else if(gen == "SYMBIAN_UNIX") { 493 mkfile = new SymbianMakefileTemplate<UnixMakefileGenerator>; 482 494 } else { 483 495 fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); … … 507 519 } 508 520 521 #endif // QT_QMAKE_PARSER_ONLY 522 523 bool 524 MetaMakefileGenerator::modesForGenerator(const QString &gen, 525 Option::HOST_MODE *host_mode, Option::TARG_MODE *target_mode) 526 { 527 if (gen == "UNIX") { 528 #ifdef Q_OS_MAC 529 *host_mode = Option::HOST_MACX_MODE; 530 *target_mode = Option::TARG_MACX_MODE; 531 #else 532 *host_mode = Option::HOST_UNIX_MODE; 533 *target_mode = Option::TARG_UNIX_MODE; 534 #endif 535 } else if (gen == "MSVC.NET" || gen == "BMAKE" || gen == "MSBUILD") { 536 *host_mode = Option::HOST_WIN_MODE; 537 *target_mode = Option::TARG_WIN_MODE; 538 } else if (gen == "MINGW") { 539 #if defined(Q_OS_MAC) 540 *host_mode = Option::HOST_MACX_MODE; 541 #elif defined(Q_OS_UNIX) 542 *host_mode = Option::HOST_UNIX_MODE; 543 #else 544 *host_mode = Option::HOST_WIN_MODE; 545 #endif 546 *target_mode = Option::TARG_WIN_MODE; 547 } else if (gen == "PROJECTBUILDER" || gen == "XCODE") { 548 *host_mode = Option::HOST_MACX_MODE; 549 *target_mode = Option::TARG_MACX_MODE; 550 } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX") { 551 #if defined(Q_OS_MAC) 552 *host_mode = Option::HOST_MACX_MODE; 553 #elif defined(Q_OS_UNIX) 554 *host_mode = Option::HOST_UNIX_MODE; 555 #else 556 *host_mode = Option::HOST_WIN_MODE; 557 #endif 558 *target_mode = Option::TARG_SYMBIAN_MODE; 559 } else { 560 fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData()); 561 return false; 562 } 563 return true; 564 } 565 509 566 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.