From 6400e4bb10ad855bd62b019bf459b50aeac53468 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 5 Feb 2015 15:45:53 +0100 Subject: [PATCH] adjust configure's path output to relative paths amends 5b27d02c3 (literally - i forgot to push the squashed commit). Change-Id: I2c588d13d5c79f9d1e4cb1ce46c4637574377c6a Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 36 ++++++++++++++++++++------------ tools/configure/configureapp.h | 2 ++ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 015ba7e6a56..ed4eb7e09a7 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3626,6 +3626,16 @@ void Configure::generateConfigfiles() } +QString Configure::formatConfigPath(const char *var) +{ + QString val = dictionary[var]; + if (QFileInfo(val).isRelative()) { + QString pfx = dictionary["QT_INSTALL_PREFIX"]; + val = (val == ".") ? pfx : QDir(pfx).absoluteFilePath(val); + } + return QDir::toNativeSeparators(val); +} + void Configure::displayConfig() { fstream sout; @@ -3767,19 +3777,19 @@ void Configure::displayConfig() sout << "Sources are in.............." << QDir::toNativeSeparators(sourcePath) << endl; sout << "Build is done in............" << QDir::toNativeSeparators(buildPath) << endl; sout << "Install prefix.............." << QDir::toNativeSeparators(dictionary["QT_INSTALL_PREFIX"]) << endl; - sout << "Headers installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_HEADERS"]) << endl; - sout << "Libraries installed to......" << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBS"]) << endl; - sout << "Arch-dep. data to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_ARCHDATA"]) << endl; - sout << "Plugins installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << endl; - sout << "Library execs installed to.." << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBEXECS"]) << endl; - sout << "QML1 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << endl; - sout << "QML2 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_QML"]) << endl; - sout << "Binaries installed to......." << QDir::toNativeSeparators(dictionary["QT_INSTALL_BINS"]) << endl; - sout << "Arch-indep. data to........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_DATA"]) << endl; - sout << "Docs installed to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_DOCS"]) << endl; - sout << "Translations installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << endl; - sout << "Examples installed to......." << QDir::toNativeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << endl; - sout << "Tests installed to.........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_TESTS"]) << endl; + sout << "Headers installed to........" << formatConfigPath("QT_REL_INSTALL_HEADERS") << endl; + sout << "Libraries installed to......" << formatConfigPath("QT_REL_INSTALL_LIBS") << endl; + sout << "Arch-dep. data to..........." << formatConfigPath("QT_REL_INSTALL_ARCHDATA") << endl; + sout << "Plugins installed to........" << formatConfigPath("QT_REL_INSTALL_PLUGINS") << endl; + sout << "Library execs installed to.." << formatConfigPath("QT_REL_INSTALL_LIBEXECS") << endl; + sout << "QML1 imports installed to..." << formatConfigPath("QT_REL_INSTALL_IMPORTS") << endl; + sout << "QML2 imports installed to..." << formatConfigPath("QT_REL_INSTALL_QML") << endl; + sout << "Binaries installed to......." << formatConfigPath("QT_REL_INSTALL_BINS") << endl; + sout << "Arch-indep. data to........." << formatConfigPath("QT_REL_INSTALL_DATA") << endl; + sout << "Docs installed to..........." << formatConfigPath("QT_REL_INSTALL_DOCS") << endl; + sout << "Translations installed to..." << formatConfigPath("QT_REL_INSTALL_TRANSLATIONS") << endl; + sout << "Examples installed to......." << formatConfigPath("QT_REL_INSTALL_EXAMPLES") << endl; + sout << "Tests installed to.........." << formatConfigPath("QT_REL_INSTALL_TESTS") << endl; if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("wince"))) { sout << "Using c runtime detection..." << dictionary[ "CE_CRT" ] << endl; diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 78fd956eda8..e58a0feb2b5 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -165,6 +165,8 @@ class Configure void desc(const char *option, const char *description, bool skipIndent = false, char fillChar = '.'); void desc(const char *mark_option, const char *mark, const char *option, const char *description, char fillChar = '.'); void applySpecSpecifics(); + + QString formatConfigPath(const char *var); }; class FileWriter : public QTextStream