diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/Makefile.unix | 2 | ||||
-rw-r--r-- | qmake/Makefile.win32 | 2 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 3 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 3 | ||||
-rw-r--r-- | qmake/library/qmake_global.h | 4 | ||||
-rw-r--r-- | qmake/library/qmakebuiltins.cpp | 28 | ||||
-rw-r--r-- | qmake/library/qmakeevaluator.cpp | 15 | ||||
-rw-r--r-- | qmake/library/qmakeglobals.cpp | 52 | ||||
-rw-r--r-- | qmake/property.cpp | 4 | ||||
-rw-r--r-- | qmake/qmake.pro | 2 |
10 files changed, 77 insertions, 38 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 9b7bfa6f8b..f55dfe45e2 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -90,7 +90,7 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \ -I$(QMAKESPEC) \ -I$(SOURCE_PATH)/tools/shared \ - -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG \ + -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 7dbef61413..761cf78975 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -38,7 +38,7 @@ CFLAGS_BARE = -c -Fo./ \ -I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \ -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \ -I$(SOURCE_PATH)\tools\shared \ - -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DPROEVALUATOR_DEBUG \ + -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL \ -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DUNICODE diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 9f83d7a898..5af71cbc7b 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1409,7 +1409,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) + fixListForOutput("QMAKE_LIBS_PRIVATE"), SettingsAsList, 6) << ";" << "\n"; } - const ProStringList &archs = project->values("QT_ARCH"); + const ProStringList &archs = !project->values("QMAKE_XCODE_ARCHS").isEmpty() ? + project->values("QMAKE_XCODE_ARCHS") : project->values("QT_ARCH"); if (!archs.isEmpty()) t << "\t\t\t\t" << writeSettings("ARCHS", archs) << ";" << "\n"; if (!project->isEmpty("OBJECTS_DIR")) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d095bdf83d..72aa1ffeb9 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2244,8 +2244,7 @@ MakefileGenerator::writeHeader(QTextStream &t) { t << "#############################################################################" << endl; t << "# Makefile for building: " << escapeFilePath(var("TARGET")) << endl; - t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ") on: "; - t << QDateTime::currentDateTime().toString() << endl; + t << "# Generated by qmake (" QMAKE_VERSION_STR ") (Qt " QT_VERSION_STR ")" << endl; t << "# Project: " << fileFixify(project->projectFile()) << endl; t << "# Template: " << var("TEMPLATE") << endl; if(!project->isActiveConfig("build_pass")) diff --git a/qmake/library/qmake_global.h b/qmake/library/qmake_global.h index 7e2247e8c6..acb95e7ab3 100644 --- a/qmake/library/qmake_global.h +++ b/qmake/library/qmake_global.h @@ -64,4 +64,8 @@ # define ALWAYS_INLINE inline #endif +#ifdef PROEVALUATOR_FULL +# define PROEVALUATOR_DEBUG +#endif + #endif diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index be0d8ea172..19a7a096a9 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -1118,11 +1118,11 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( } } return ReturnFalse; -#ifdef PROEVALUATOR_FULL case T_REQUIRES: +#ifdef PROEVALUATOR_FULL checkRequirements(args); - return ReturnFalse; // Another qmake breakage #endif + return ReturnFalse; // Another qmake breakage case T_EVAL: { VisitReturn ret = ReturnFalse; ProFile *pro = m_parser->parsedProBlock(args.join(statics.field_sep), @@ -1389,14 +1389,14 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( } return (func_t == T_ERROR && !m_cumulative) ? ReturnError : ReturnTrue; } -#ifdef PROEVALUATOR_FULL case T_SYSTEM: { - if (m_cumulative) // Anything else would be insanity - return ReturnFalse; if (args.count() != 1) { evalError(fL1S("system(exec) requires one argument.")); return ReturnFalse; } +#ifdef PROEVALUATOR_FULL + if (m_cumulative) // Anything else would be insanity + return ReturnFalse; #ifndef QT_BOOTSTRAPPED QProcess proc; proc.setProcessChannelMode(QProcess::ForwardedChannels); @@ -1407,8 +1407,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( + IoUtils::shellQuote(QDir::toNativeSeparators(currentDirectory())) + QLatin1String(" && ") + args.at(0)).toLocal8Bit().constData()) == 0); #endif - } +#else + return ReturnTrue; #endif + } case T_ISEMPTY: { if (args.count() != 1) { evalError(fL1S("isEmpty(var) requires one argument.")); @@ -1435,17 +1437,18 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( return ReturnFalse; } -#ifdef PROEVALUATOR_FULL case T_MKPATH: { if (args.count() != 1) { evalError(fL1S("mkpath(file) requires one argument.")); return ReturnFalse; } +#ifdef PROEVALUATOR_FULL const QString &fn = resolvePath(args.at(0).toQString(m_tmp1)); if (!QDir::current().mkpath(fn)) { evalError(fL1S("Cannot create directory %1.").arg(QDir::toNativeSeparators(fn))); return ReturnFalse; } +#endif return ReturnTrue; } case T_WRITE_FILE: { @@ -1453,6 +1456,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( evalError(fL1S("write_file(name, [content var, [append]]) requires one to three arguments.")); return ReturnFalse; } +#ifdef PROEVALUATOR_FULL QIODevice::OpenMode mode = QIODevice::Truncate; QString contents; if (args.count() >= 2) { @@ -1464,12 +1468,16 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( mode = QIODevice::Append; } return writeFile(QString(), resolvePath(args.at(0).toQString(m_tmp1)), mode, contents); +#else + return ReturnTrue; +#endif } case T_TOUCH: { if (args.count() != 2) { evalError(fL1S("touch(file, reffile) requires two arguments.")); return ReturnFalse; } +#ifdef PROEVALUATOR_FULL const QString &tfn = resolvePath(args.at(0).toQString(m_tmp1)); const QString &rfn = resolvePath(args.at(1).toQString(m_tmp2)); #ifdef Q_OS_UNIX @@ -1506,6 +1514,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( SetFileTime(wHand, 0, 0, &ft); CloseHandle(wHand); #endif +#endif return ReturnTrue; } case T_CACHE: { @@ -1513,6 +1522,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( evalError(fL1S("cache(var, [set|add|sub] [transient] [super], [srcvar]) requires one to three arguments.")); return ReturnFalse; } +#ifdef PROEVALUATOR_FULL bool persist = true; bool super = false; enum { CacheSet, CacheAdd, CacheSub } mode = CacheSet; @@ -1638,8 +1648,10 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( fn = m_cachefile; } return writeFile(fL1S("cache "), fn, QIODevice::Append, varstr); - } +#else + return ReturnTrue; #endif + } default: evalError(fL1S("Function '%1' is not implemented.").arg(function.toQString(m_tmp1))); return ReturnFalse; diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index c60119615f..1d90be9ca1 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -1171,6 +1171,8 @@ bool QMakeEvaluator::loadSpec() { QMakeEvaluator evaluator(m_option, m_parser, m_handler); + evaluator.m_sourceRoot = m_sourceRoot; + evaluator.m_buildRoot = m_buildRoot; if (!m_superfile.isEmpty()) { valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile); if (evaluator.evaluateFile( @@ -1426,6 +1428,7 @@ void QMakeEvaluator::updateMkspecPaths() ret << m_sourceRoot + concat; ret << m_option->propertyValue(ProKey("QT_HOST_DATA/get")) + concat; + ret << m_option->propertyValue(ProKey("QT_HOST_DATA/src")) + concat; ret.removeDuplicates(); m_mkspecPaths = ret; @@ -1447,10 +1450,14 @@ void QMakeEvaluator::updateFeaturePaths() m_option->dirlist_sep, QString::SkipEmptyParts); QStringList feature_bases; - if (!m_buildRoot.isEmpty()) + if (!m_buildRoot.isEmpty()) { + feature_bases << m_buildRoot + mkspecs_concat; feature_bases << m_buildRoot; - if (!m_sourceRoot.isEmpty()) + } + if (!m_sourceRoot.isEmpty()) { + feature_bases << m_sourceRoot + mkspecs_concat; feature_bases << m_sourceRoot; + } foreach (const QString &item, m_option->getPathListEnv(QLatin1String("QMAKEPATH"))) feature_bases << (item + mkspecs_concat); @@ -1474,8 +1481,8 @@ void QMakeEvaluator::updateFeaturePaths() } } - feature_bases << (m_option->propertyValue(ProKey("QT_HOST_DATA/get")).toQString(m_mtmp) - + mkspecs_concat); + feature_bases << (m_option->propertyValue(ProKey("QT_HOST_DATA/get")) + mkspecs_concat); + feature_bases << (m_option->propertyValue(ProKey("QT_HOST_DATA/src")) + mkspecs_concat); foreach (const QString &fb, feature_bases) { foreach (const ProString &sfx, values(ProKey("QMAKE_PLATFORM"))) diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp index 42bb85bb02..e47a4efe0b 100644 --- a/qmake/library/qmakeglobals.cpp +++ b/qmake/library/qmakeglobals.cpp @@ -323,34 +323,46 @@ bool QMakeGlobals::initProperties() QT_PCLOSE(proc); } #endif - foreach (QByteArray line, data.split('\n')) - if (!line.startsWith("QMAKE_")) { - int off = line.indexOf(':'); - if (off < 0) // huh? - continue; - if (line.endsWith('\r')) - line.chop(1); - QString name = QString::fromLatin1(line.left(off)); - ProString value = ProString(QDir::fromNativeSeparators( - QString::fromLocal8Bit(line.mid(off + 1)))); - properties.insert(ProKey(name), value); - if (name.startsWith(QLatin1String("QT_")) && !name.contains(QLatin1Char('/'))) { - if (name.startsWith(QLatin1String("QT_INSTALL_"))) { + foreach (QByteArray line, data.split('\n')) { + int off = line.indexOf(':'); + if (off < 0) // huh? + continue; + if (line.endsWith('\r')) + line.chop(1); + QString name = QString::fromLatin1(line.left(off)); + ProString value = ProString(QDir::fromNativeSeparators( + QString::fromLocal8Bit(line.mid(off + 1)))); + properties.insert(ProKey(name), value); + if (name.startsWith(QLatin1String("QT_"))) { + bool plain = !name.contains(QLatin1Char('/')); + if (!plain) { + if (!name.endsWith(QLatin1String("/get"))) + continue; + name.chop(4); + } + if (name.startsWith(QLatin1String("QT_INSTALL_"))) { + if (plain) { properties.insert(ProKey(name + QLatin1String("/raw")), value); properties.insert(ProKey(name + QLatin1String("/get")), value); - if (name == QLatin1String("QT_INSTALL_PREFIX") - || name == QLatin1String("QT_INSTALL_DATA") - || name == QLatin1String("QT_INSTALL_BINS")) { - name.replace(3, 7, QLatin1String("HOST")); + } + properties.insert(ProKey(name + QLatin1String("/src")), value); + if (name == QLatin1String("QT_INSTALL_PREFIX") + || name == QLatin1String("QT_INSTALL_DATA") + || name == QLatin1String("QT_INSTALL_BINS")) { + name.replace(3, 7, QLatin1String("HOST")); + if (plain) { properties.insert(ProKey(name), value); properties.insert(ProKey(name + QLatin1String("/get")), value); } - } else if (name.startsWith(QLatin1String("QT_HOST_"))) { - properties.insert(ProKey(name + QLatin1String("/get")), value); + properties.insert(ProKey(name + QLatin1String("/src")), value); } + } else if (name.startsWith(QLatin1String("QT_HOST_"))) { + if (plain) + properties.insert(ProKey(name + QLatin1String("/get")), value); + properties.insert(ProKey(name + QLatin1String("/src")), value); } } - properties.insert(ProKey("QMAKE_VERSION"), ProString("2.01a")); + } return true; } #else diff --git a/qmake/property.cpp b/qmake/property.cpp index 4685440b48..38d454cb5d 100644 --- a/qmake/property.cpp +++ b/qmake/property.cpp @@ -83,6 +83,7 @@ QMakeProperty::QMakeProperty() : settings(0) { for (int i = 0; i < sizeof(propList)/sizeof(propList[0]); i++) { QString name = QString::fromLatin1(propList[i].name); + m_values[ProKey(name + "/src")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectiveSourcePaths); m_values[ProKey(name + "/get")] = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::EffectivePaths); QString val = QLibraryInfo::rawLocation(propList[i].loc, QLibraryInfo::FinalPaths); if (!propList[i].raw) { @@ -164,11 +165,14 @@ QMakeProperty::exec() ProString val = value(ProKey(prop)); ProString pval = value(ProKey(prop + "/raw")); ProString gval = value(ProKey(prop + "/get")); + ProString sval = value(ProKey(prop + "/src")); fprintf(stdout, "%s:%s\n", prop.toLatin1().constData(), val.toLatin1().constData()); if (!pval.isEmpty() && pval != val) fprintf(stdout, "%s/raw:%s\n", prop.toLatin1().constData(), pval.toLatin1().constData()); if (!gval.isEmpty() && gval != (pval.isEmpty() ? val : pval)) fprintf(stdout, "%s/get:%s\n", prop.toLatin1().constData(), gval.toLatin1().constData()); + if (!sval.isEmpty() && sval != gval) + fprintf(stdout, "%s/src:%s\n", prop.toLatin1().constData(), sval.toLatin1().constData()); } return true; } diff --git a/qmake/qmake.pro b/qmake/qmake.pro index a81d0cdf77..568ad41ce1 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -6,7 +6,7 @@ option(host_build) CONFIG += console bootstrap CONFIG -= qt shared app_bundle uic DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \ - PROEVALUATOR_FULL PROEVALUATOR_DEBUG + PROEVALUATOR_FULL DESTDIR = ../bin/ OBJECTS_DIR = . |