Changeset 976


Ignore:
Timestamp:
Aug 13, 2011, 10:06:30 PM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: Ensure Makefile generation order in ordered builds.

When one sub-project links to another sub-project's library, ordered
builds are used. However, it's not enough only to build the projects in
the respective order, Makefile generation should be ordered too. One
reason for that is projects using library names with version suffixes
which qmake deduces at Makefile generation time from the .prl file if
the actual library file is not there (not yet built). The .prl file is
generated along with the respective Makefile; hence the dependency.

This applicable to at least Windows and OS/2 and fixes parallel build issues
with some libraries (e.g. QtHelp which depends on QtCLucene).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qmake/generators/makefile.cpp

    r962 r976  
    24672467    }
    24682468
     2469
     2470
    24692471    // generate target rules
    24702472    for(int target = 0; target < targets.size(); ++target) {
     
    25132515            if(out.startsWith(out_directory))
    25142516                out = out.mid(out_directory.length());
    2515             t << mkfile << ": " << "\n\t";
     2517            t << mkfile << ": ";
     2518            if(flags & SubTargetOrdered) {
     2519                // ensure Makefile generation order as the dependent project may
     2520                // need a .prl file from the one it depends on in order to
     2521                // generate a correct library name if version suffixes are used
     2522                if (!prev_mkfile.isEmpty())
     2523                    t << prev_mkfile;
     2524                prev_mkfile = mkfile;
     2525            }
     2526            t << "\n\t";
    25162527            if(!in_directory.isEmpty()) {
    25172528                t << mkdir_p_asstring(out_directory)
     
    25232534            }
    25242535            t << subtarget->target << "-qmake_all: ";
     2536
     2537
     2538
     2539
     2540
    25252541            if(project->isEmpty("QMAKE_NOFORCE"))
    25262542                t <<  " FORCE";
Note: See TracChangeset for help on using the changeset viewer.