Ignore:
Timestamp:
Aug 11, 2011, 2:11:32 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: Recognize 'no_vpath' and 'no_fixify' in install target's .CONFIG.

This is used to prevent qmake from searching for files listed in .files in
VPATH directories ('no_vpath') and from fixifying these files (in particular
by assuming they are relative to the source dir) ('no_fixify'). This allows
to speficy arbitrary names in .files (e.g. make variable references) and
make sure they appear in the install command unchanged.

File:
1 edited

Legend:

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

    r909 r962  
    12521252    QStringList &l = project->values(installs);
    12531253    for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
     1254
    12541255        QString pvar = (*it) + ".path";
    1255         if(project->values((*it) + ".CONFIG").indexOf("no_path") == -1 &&
    1256            project->values((*it) + ".CONFIG").indexOf("dummy_install") == -1 &&
     1256        if(.indexOf("no_path") == -1 &&
     1257           .indexOf("dummy_install") == -1 &&
    12571258           project->values(pvar).isEmpty()) {
    12581259            warn_msg(WarnLogic, "%s is not defined: install target not created\n", pvar.toLatin1().constData());
     
    12631264        const QString root = "$(INSTALL_ROOT)";
    12641265        QString target, dst;
    1265         if(project->values((*it) + ".CONFIG").indexOf("no_path") == -1 &&
    1266            project->values((*it) + ".CONFIG").indexOf("dummy_install") == -1) {
     1266        if(.indexOf("no_path") == -1 &&
     1267           .indexOf("dummy_install") == -1) {
    12671268            dst = fileFixify(unescapeFilePath(project->values(pvar).first()), FileFixifyAbsolute, false);
    12681269        }
     
    12831284        }
    12841285        //masks
    1285         tmp = findFilesInVPATH(project->values((*it) + ".files"), VPATH_NoFixify);
    1286         tmp = fileFixify(tmp, FileFixifyAbsolute);
     1286        tmp = project->values((*it) + ".files");
     1287        if(!installConfigValues.contains("no_vpath"))
     1288            tmp = findFilesInVPATH(tmp, VPATH_NoFixify);
     1289        if(!installConfigValues.contains("no_fixify"))
     1290            tmp = fileFixify(tmp, FileFixifyAbsolute);
    12871291        if(!tmp.isEmpty()) {
    12881292            if(!target.isEmpty())
     
    13331337                QString local_dirstr = Option::fixPathToLocalOS(dirstr, true);
    13341338                QStringList files = QDir(local_dirstr).entryList(QStringList(filestr));
    1335                 const QStringList &installConfigValues = project->values((*it) + ".CONFIG");
    13361339                if (installConfigValues.contains("no_check_exist") && files.isEmpty()) {
    13371340                    if(!target.isEmpty())
     
    13911394        }
    13921395
    1393         if(!target.isEmpty() || project->values((*it) + ".CONFIG").indexOf("dummy_install") != -1) {
    1394             if(noBuild || project->values((*it) + ".CONFIG").indexOf("no_build") != -1)
     1396        if(!target.isEmpty() || .indexOf("dummy_install") != -1) {
     1397            if(noBuild || .indexOf("no_build") != -1)
    13951398                t << "install_" << (*it) << ":";
    13961399            else if(project->isActiveConfig("build_all"))
     
    14281431            t << endl;
    14291432
    1430             if(project->values((*it) + ".CONFIG").indexOf("no_default_install") == -1) {
     1433            if(.indexOf("no_default_install") == -1) {
    14311434                all_installs += QString("install_") + (*it) + " ";
    14321435                if(!uninst.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.