From 3f5633bc254cdaea7edf1cf1951a7c4c1ba2a487 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 25 Feb 2013 19:54:48 +0100 Subject: 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 --- qmake/generators/metamakefile.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'qmake/generators/metamakefile.cpp') 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); -- cgit v1.2.3