diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-02-25 19:54:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-07 00:42:56 +0100 |
commit | 3f5633bc254cdaea7edf1cf1951a7c4c1ba2a487 (patch) | |
tree | 98166d24e0e55f4391f374ca2040ae59060165f8 /qmake | |
parent | 083c8ce840216ab412bd8d20d5f61a7e24a6d615 (diff) |
remove some cryptic code relating to output directories
the purpose of it is truly elusive - the output directory is maintained
by the surrounding code anyway.
Change-Id: Id1a481d85a7b83ab0676ef650c900414d0ba83b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/metamakefile.cpp | 16 | ||||
-rw-r--r-- | qmake/generators/metamakefile.h | 2 | ||||
-rw-r--r-- | qmake/main.cpp | 2 |
3 files changed, 8 insertions, 12 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index 8c10d7d306..e3fa39c7e4 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -79,7 +79,7 @@ public: virtual bool init(); virtual int type() const { return BUILDSMETATYPE; } - virtual bool write(const QString &); + virtual bool write(); }; void @@ -149,7 +149,7 @@ BuildsMetaMakefileGenerator::init() } bool -BuildsMetaMakefileGenerator::write(const QString &oldpwd) +BuildsMetaMakefileGenerator::write() { Build *glue = 0; if(!makefiles.isEmpty() && !makefiles.first()->build.isNull()) { @@ -181,7 +181,6 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd) if(Option::output.fileName().isEmpty() && Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE) Option::output.setFileName(project->first("QMAKE_MAKEFILE").toQString()); - Option::output_dir = oldpwd; QString build_name = build->name; if(!build->build.isEmpty()) { if(!build_name.isEmpty()) @@ -268,7 +267,7 @@ public: virtual bool init(); virtual int type() const { return SUBDIRSMETATYPE; } - virtual bool write(const QString &); + virtual bool write(); }; bool @@ -349,7 +348,7 @@ SubdirsMetaMakefileGenerator::init() } else { const QString output_name = Option::output.fileName(); Option::output.setFileName(sub->output_file); - hasError |= !sub->makefile->write(sub->output_dir); + hasError |= !sub->makefile->write(); delete sub; qmakeClearCaches(); sub = 0; @@ -378,7 +377,7 @@ SubdirsMetaMakefileGenerator::init() } bool -SubdirsMetaMakefileGenerator::write(const QString &oldpwd) +SubdirsMetaMakefileGenerator::write() { bool ret = true; const QString &pwd = qmake_getpwd(); @@ -397,10 +396,7 @@ SubdirsMetaMakefileGenerator::write(const QString &oldpwd) printf("Writing %s\n", QDir::cleanPath(Option::output_dir+"/"+ Option::output.fileName()).toLatin1().constData()); } - QString writepwd = Option::fixPathToLocalOS(qmake_getpwd()); - if(!writepwd.startsWith(Option::fixPathToLocalOS(oldpwd))) - writepwd = oldpwd; - if(!(ret = subs.at(i)->makefile->write(writepwd))) + if (!(ret = subs.at(i)->makefile->write())) break; //restore because I'm paranoid qmake_setpwd(pwd); diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h index 85106a674d..aff2f422a6 100644 --- a/qmake/generators/metamakefile.h +++ b/qmake/generators/metamakefile.h @@ -69,7 +69,7 @@ public: virtual bool init() = 0; virtual int type() const { return -1; } - virtual bool write(const QString &oldpwd) = 0; + virtual bool write() = 0; }; QT_END_NAMESPACE diff --git a/qmake/main.cpp b/qmake/main.cpp index 5f9fb05449..e339239289 100644 --- a/qmake/main.cpp +++ b/qmake/main.cpp @@ -187,7 +187,7 @@ int runQMake(int argc, char **argv) if (!success) exit_val = 3; - if(mkfile && !mkfile->write(oldpwd)) { + if (mkfile && !mkfile->write()) { if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) fprintf(stderr, "Unable to generate project file.\n"); else |