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>
This commit is contained in:
parent
083c8ce840
commit
3f5633bc25
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user