Skip to content

Commit

Permalink
adjust configure's path output to relative paths
Browse files Browse the repository at this point in the history
amends 5b27d02 (literally - i forgot to push the squashed commit).

Change-Id: I2c588d13d5c79f9d1e4cb1ce46c4637574377c6a
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator committed Mar 6, 2015
1 parent 1480a9c commit 6400e4b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
36 changes: 23 additions & 13 deletions tools/configure/configureapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions tools/configure/configureapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6400e4b

Please sign in to comment.