Changeset 189 for trunk/qmake


Ignore:
Timestamp:
Sep 22, 2009, 2:10:57 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: Obey OS/2 CMD.EXE cmd.line length restriction in $(DEL_FILE) statements (r37 contd).

Location:
trunk/qmake/generators
Files:
2 edited

Legend:

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

    r162 r189  
    17991799            if(tmp_clean.isEmpty())
    18001800                tmp_clean = tmp_out;
     1801
     1802
     1803
     1804
     1805
     1806
     1807
    18011808            if(tmp_clean.indexOf("${QMAKE_") == -1) {
    1802                 t << "\n\t" << "-$(DEL_FILE) " << tmp_clean;
     1809                t << "\n\t" << ;
    18031810                wrote_clean = true;
    18041811            }
    18051812            if(!wrote_clean_cmds || !wrote_clean) {
    18061813                QStringList cleans;
    1807                 const QString del_statement("-$(DEL_FILE)");
    18081814                if(!wrote_clean) {
    18091815                    if(project->isActiveConfig("no_delete_multiple_files")) {
     
    18131819                    } else {
    18141820                        QString files, file;
    1815                         const int commandlineLimit = 2047; // NT limit, expanded
     1821                        const int commandlineLimit =
     1822                            Option::target_mode == Option::TARG_OS2_MODE ?
     1823                                1000: // OS/2 CMD.EXE limit (1024 - suffix - reserve)
     1824                                2047; // NT limit, expanded
    18161825                        for(int input = 0; input < tmp_inputs.size(); ++input) {
    18171826                            file = " " + replaceExtraCompilerVariables(tmp_clean, tmp_inputs.at(input),
     
    18291838                }
    18301839                if(!cleans.isEmpty())
    1831                     t << valGlue(cleans, "\n\t" + del_statement, "\n\t" + del_statement, "");
     1840                    t << valGlue(cleans, "\n\t" + del_statement, );
    18321841                if(!wrote_clean_cmds) {
    18331842                    for(QStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
     
    24932502            t <<  " FORCE";
    24942503        t << endl;
     2504
     2505
     2506
     2507
    24952508        if(suffix == "clean") {
    2496             t << varGlue("QMAKE_CLEAN","\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ", "\n");
     2509            t << varGlue("QMAKE_CLEAN","\t-$(DEL_FILE) ",);
    24972510        } else if(suffix == "distclean") {
    24982511            QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
    24992512            if(!ofile.isEmpty())
    2500                 t << "\t-$(DEL_FILE) " << ofile << endl;
     2513                t << "\t-$(DEL_FILE) " << ofile << endl;
    25012514        } else if(project->isActiveConfig("no_empty_targets")) {
    25022515            t << "\t" << "@cd ." << endl;
  • trunk/qmake/generators/win32/winmakefile.cpp

    r158 r189  
    489489    const QString del_suffix =
    490490        Option::target_mode == Option::TARG_OS2_MODE ?
    491         QString(" >nul 2>&1"): // reduce noise
    492         QString::null;
     491        QString(" >nul 2>&1"): // reduce noise
     492        QString::null;
    493493
    494494    const int commandlineLimit =
    495495        Option::target_mode == Option::TARG_OS2_MODE ?
    496         1024: // OS/2 CMD.EXE limit
     496        10
    497497        2047; // NT limit, expanded
    498498
     
    784784        targetdir += Option::dir_sep;
    785785
     786
     787
     788
     789
     790
    786791    if(t == "target" && project->first("TEMPLATE") == "lib") {
    787792        if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") &&
     
    795800            if(!uninst.isEmpty())
    796801                uninst.append("\n\t");
    797             uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
     802            uninst.append("-$(DEL_FILE) \"" + dst_prl + "\"");
    798803        }
    799804        if(project->isActiveConfig("shared") && !project->isActiveConfig("plugin")) {
     
    807812            if(!uninst.isEmpty())
    808813                uninst.append("\n\t");
    809             uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
     814            uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
    810815        }
    811816    }
     
    819824        if(!uninst.isEmpty())
    820825            uninst.append("\n\t");
    821         uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
     826        uninst.append("-$(DEL_FILE) \"" + dst_targ + "\"");
    822827    }
    823828    return ret;
Note: See TracChangeset for help on using the changeset viewer.