fix -spec/-xspec argument re-assembly

the specs in Option are now only fixifiable absolute paths if an actual
path was passed on the command line - otherwise these are just names,
and we should pass them on verbatim.

Change-Id: I5b3535dadf2d6b2b3116331e6636f6e363a5361f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-06-26 15:29:35 +02:00 committed by Qt by Nokia
parent 61162c6e87
commit 851d666bcc
2 changed files with 10 additions and 2 deletions

View File

@ -2160,6 +2160,13 @@ MakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
QString MakefileGenerator::fixifySpecdir(const QString &spec, const QString &outdir)
{
if (QFileInfo(spec).isAbsolute())
return fileFixify(spec, outdir);
return spec;
}
QString MakefileGenerator::buildArgs(const QString &outdir)
{
QString ret;
@ -2186,9 +2193,9 @@ QString MakefileGenerator::buildArgs(const QString &outdir)
if(!Option::mkfile::do_dep_heuristics)
ret += " -nodependheuristics";
if(!Option::mkfile::qmakespec_commandline.isEmpty())
ret += " -spec " + specdir(outdir, 1);
ret += " -spec " + fixifySpecdir(Option::mkfile::qmakespec, outdir);
if (!Option::mkfile::xqmakespec_commandline.isEmpty())
ret += " -xspec " + specdir(outdir, 0);
ret += " -xspec " + fixifySpecdir(Option::mkfile::xqmakespec, outdir);
if (Option::target_mode_overridden) {
if (Option::target_mode == Option::TARG_MACX_MODE)
ret += " -macx";

View File

@ -192,6 +192,7 @@ protected:
//subclasses can use these to query information about how the generator was "run"
QString buildArgs(const QString &outdir=QString());
QString specdir(const QString &outdir = QString(), int host_build = -1);
QString fixifySpecdir(const QString &spec, const QString &outdir);
virtual QStringList &findDependencies(const QString &file);
virtual bool doDepends() const { return Option::mkfile::do_deps; }