From 851d666bccc05b2ec9c38dbffd8be72b5303a8d6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 26 Jun 2012 15:29:35 +0200 Subject: 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 Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 11 +++++++++-- qmake/generators/makefile.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 83354b9114..0e7bc99691 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -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"; diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 33602dcf80..e0863fb7d8 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -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; } -- cgit v1.2.3