summaryrefslogtreecommitdiffstats
path: root/qmake/option.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-05-09 15:14:37 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-19 16:37:49 +0200
commit4e9cbfc90f6db09d865d9dc5bb40924fbe0d11a3 (patch)
treec227d4dc3915399662764abef984815f60f1ddf6 /qmake/option.cpp
parentd8b2998daeab9bfb7bfb5182960ec09b94885b17 (diff)
Revert "move .qmake.cache search to Option"
We are now moving in the exact opposite direction. This logically reverts commit 059200a44ba7177d0c9ec6bb5e6ee0b7e0c3f017. Some adjustments were necessary to maintain the project root stuff. Conflicts: qmake/main.cpp qmake/option.cpp qmake/option.h qmake/project.cpp Change-Id: Ic14fa571cbbfe9ac159f92493e49741d70a87eff Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/option.cpp')
-rw-r--r--qmake/option.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 3ddde2a11a..de907f0528 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -114,8 +114,6 @@ bool Option::mkfile::do_dep_heuristics = true;
bool Option::mkfile::do_preprocess = false;
bool Option::mkfile::do_stub_makefile = false;
bool Option::mkfile::do_cache = true;
-QString Option::mkfile::project_root;
-QString Option::mkfile::project_build_root;
QString Option::mkfile::cachefile;
QStringList Option::mkfile::project_files;
QString Option::mkfile::qmakespec_commandline;
@@ -583,62 +581,6 @@ void Option::applyHostMode()
}
}
-bool Option::prepareProject(const QString &pfile)
-{
- mkfile::project_build_root.clear();
- if (mkfile::do_cache) {
- if (mkfile::cachefile.isEmpty()) { //find it as it has not been specified
- QDir dir(output_dir);
- while (!dir.exists(QLatin1String(".qmake.cache")))
- if (dir.isRoot() || !dir.cdUp())
- goto no_cache;
- mkfile::cachefile = dir.filePath(QLatin1String(".qmake.cache"));
- mkfile::project_build_root = dir.path();
- } else {
- QFileInfo fi(mkfile::cachefile);
- mkfile::cachefile = QDir::cleanPath(fi.absoluteFilePath());
- mkfile::project_build_root = QDir::cleanPath(fi.absolutePath());
- }
-
- if (mkfile::qmakespec.isEmpty()) {
- QMakeProject cproj;
- if (!cproj.read(mkfile::cachefile, QMakeProject::ReadProFile))
- return false;
- mkfile::qmakespec = cproj.first(QLatin1String("QMAKESPEC"));
- }
- }
- no_cache:
-
- QString srcpath = (pfile != "-")
- ? QDir::cleanPath(QFileInfo(pfile).absolutePath()) : qmake_getpwd();
- if (srcpath != output_dir || mkfile::project_build_root.isEmpty()) {
- QDir srcdir(srcpath);
- QDir dstdir(output_dir);
- do {
- if (!mkfile::project_build_root.isEmpty()) {
- // If we already know the build root, just match up the source root with it.
- if (dstdir.path() == mkfile::project_build_root) {
- mkfile::project_root = srcdir.path();
- break;
- }
- } else {
- // Look for mkspecs/ in source and build. First to win determines the root.
- if (dstdir.exists("mkspecs") || srcdir.exists("mkspecs")) {
- mkfile::project_build_root = dstdir.path();
- mkfile::project_root = srcdir.path();
- if (mkfile::project_root == mkfile::project_build_root)
- mkfile::project_root.clear();
- break;
- }
- }
- } while (!srcdir.isRoot() && srcdir.cdUp() && !dstdir.isRoot() && dstdir.cdUp());
- } else {
- mkfile::project_root.clear();
- }
-
- return true;
-}
-
bool Option::postProcessProject(QMakeProject *project)
{
Option::cpp_ext = project->variables()["QMAKE_EXT_CPP"];