summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp11
-rw-r--r--qmake/generators/makefile.h1
2 files changed, 10 insertions, 2 deletions
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; }