remove possibility to request project recursion from within a pro file again
the feature was implemented for the abld/sbs2 generators only, and is of course undocumented. this reverts most of commit e795e61ef93f8080f9938ac49f2fca306644af85. Change-Id: Ibd1726b036ce6c45f8e678ea996218f774f8aed2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
parent
031ac3c167
commit
b6b6e85f6b
@ -281,14 +281,7 @@ SubdirsMetaMakefileGenerator::init()
|
|||||||
init_flag = true;
|
init_flag = true;
|
||||||
bool hasError = false;
|
bool hasError = false;
|
||||||
|
|
||||||
// It might make sense to bequeath the CONFIG option to the recursed
|
bool recurse = Option::recursive;
|
||||||
// projects. OTOH, one would most likely have it in all projects anyway -
|
|
||||||
// either through a qmakespec, a .qmake.cache or explicitly - as otherwise
|
|
||||||
// running qmake in a subdirectory would have a different auto-recurse
|
|
||||||
// setting than in parent directories.
|
|
||||||
bool recurse = Option::recursive == Option::QMAKE_RECURSIVE_YES
|
|
||||||
|| (Option::recursive == Option::QMAKE_RECURSIVE_DEFAULT
|
|
||||||
&& project->isRecursive());
|
|
||||||
if (recurse && project->isActiveConfig("dont_recurse"))
|
if (recurse && project->isActiveConfig("dont_recurse"))
|
||||||
recurse = false;
|
recurse = false;
|
||||||
if(recurse) {
|
if(recurse) {
|
||||||
|
@ -105,7 +105,7 @@ ProjectGenerator::init()
|
|||||||
add_depend = true;
|
add_depend = true;
|
||||||
if(dir.right(1) != Option::dir_sep)
|
if(dir.right(1) != Option::dir_sep)
|
||||||
dir += Option::dir_sep;
|
dir += Option::dir_sep;
|
||||||
if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
|
if (Option::recursive) {
|
||||||
QStringList files = QDir(dir).entryList(QDir::Files);
|
QStringList files = QDir(dir).entryList(QDir::Files);
|
||||||
for(int i = 0; i < (int)files.count(); i++) {
|
for(int i = 0; i < (int)files.count(); i++) {
|
||||||
if(files[i] != "." && files[i] != "..")
|
if(files[i] != "." && files[i] != "..")
|
||||||
@ -132,7 +132,7 @@ ProjectGenerator::init()
|
|||||||
dir = regex.left(s+1);
|
dir = regex.left(s+1);
|
||||||
regex = regex.right(regex.length() - (s+1));
|
regex = regex.right(regex.length() - (s+1));
|
||||||
}
|
}
|
||||||
if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
|
if (Option::recursive) {
|
||||||
QStringList entries = QDir(dir).entryList(QDir::Dirs);
|
QStringList entries = QDir(dir).entryList(QDir::Dirs);
|
||||||
for(int i = 0; i < (int)entries.count(); i++) {
|
for(int i = 0; i < (int)entries.count(); i++) {
|
||||||
if(entries[i] != "." && entries[i] != "..") {
|
if(entries[i] != "." && entries[i] != "..") {
|
||||||
@ -187,7 +187,7 @@ ProjectGenerator::init()
|
|||||||
subdirs.append(nd);
|
subdirs.append(nd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Option::recursive == Option::QMAKE_RECURSIVE_YES) {
|
if (Option::recursive) {
|
||||||
QStringList dirs = QDir(newdir).entryList(QDir::Dirs);
|
QStringList dirs = QDir(newdir).entryList(QDir::Dirs);
|
||||||
for(int i = 0; i < (int)dirs.count(); i++) {
|
for(int i = 0; i < (int)dirs.count(); i++) {
|
||||||
QString nd = fileFixify(newdir + QDir::separator() + dirs[i]);
|
QString nd = fileFixify(newdir + QDir::separator() + dirs[i]);
|
||||||
@ -224,8 +224,7 @@ ProjectGenerator::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Option::recursive == Option::QMAKE_RECURSIVE_YES
|
if (Option::recursive && !knownDirs.contains(newdir, Qt::CaseInsensitive))
|
||||||
&& !knownDirs.contains(newdir, Qt::CaseInsensitive))
|
|
||||||
knownDirs.append(newdir);
|
knownDirs.append(newdir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ int Option::warn_level = WarnLogic | WarnDeprecated;
|
|||||||
int Option::debug_level = 0;
|
int Option::debug_level = 0;
|
||||||
QFile Option::output;
|
QFile Option::output;
|
||||||
QString Option::output_dir;
|
QString Option::output_dir;
|
||||||
Option::QMAKE_RECURSIVE Option::recursive = Option::QMAKE_RECURSIVE_DEFAULT;
|
bool Option::recursive = false;
|
||||||
QStringList Option::before_user_vars;
|
QStringList Option::before_user_vars;
|
||||||
QStringList Option::after_user_vars;
|
QStringList Option::after_user_vars;
|
||||||
QString Option::user_template;
|
QString Option::user_template;
|
||||||
@ -225,7 +225,7 @@ Option::parseCommandLine(int argc, char **argv, int skip)
|
|||||||
if(x == 1) {
|
if(x == 1) {
|
||||||
bool specified = true;
|
bool specified = true;
|
||||||
if(opt == "project") {
|
if(opt == "project") {
|
||||||
Option::recursive = Option::QMAKE_RECURSIVE_YES;
|
Option::recursive = true;
|
||||||
Option::qmake_mode = Option::QMAKE_GENERATE_PROJECT;
|
Option::qmake_mode = Option::QMAKE_GENERATE_PROJECT;
|
||||||
} else if(opt == "prl") {
|
} else if(opt == "prl") {
|
||||||
Option::mkfile::do_deps = false;
|
Option::mkfile::do_deps = false;
|
||||||
@ -283,9 +283,9 @@ Option::parseCommandLine(int argc, char **argv, int skip)
|
|||||||
} else if(opt == "Wnone") {
|
} else if(opt == "Wnone") {
|
||||||
Option::warn_level = WarnNone;
|
Option::warn_level = WarnNone;
|
||||||
} else if(opt == "r" || opt == "recursive") {
|
} else if(opt == "r" || opt == "recursive") {
|
||||||
Option::recursive = Option::QMAKE_RECURSIVE_YES;
|
Option::recursive = true;
|
||||||
} else if(opt == "nr" || opt == "norecursive") {
|
} else if(opt == "nr" || opt == "norecursive") {
|
||||||
Option::recursive = Option::QMAKE_RECURSIVE_NO;
|
Option::recursive = false;
|
||||||
} else if(opt == "config") {
|
} else if(opt == "config") {
|
||||||
user_configs += argv[++x];
|
user_configs += argv[++x];
|
||||||
} else {
|
} else {
|
||||||
|
@ -165,8 +165,7 @@ struct Option
|
|||||||
static QString output_dir;
|
static QString output_dir;
|
||||||
static int debug_level;
|
static int debug_level;
|
||||||
static int warn_level;
|
static int warn_level;
|
||||||
enum QMAKE_RECURSIVE { QMAKE_RECURSIVE_DEFAULT, QMAKE_RECURSIVE_YES, QMAKE_RECURSIVE_NO };
|
static bool recursive;
|
||||||
static QMAKE_RECURSIVE recursive;
|
|
||||||
static QStringList before_user_vars, after_user_vars;
|
static QStringList before_user_vars, after_user_vars;
|
||||||
static QString user_template, user_template_prefix;
|
static QString user_template, user_template_prefix;
|
||||||
|
|
||||||
|
@ -672,7 +672,6 @@ QMakeProject::init(QMakeProperty *p)
|
|||||||
prop = p;
|
prop = p;
|
||||||
own_prop = false;
|
own_prop = false;
|
||||||
}
|
}
|
||||||
recursive = false;
|
|
||||||
host_build = false;
|
host_build = false;
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
@ -3225,9 +3224,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QHash<QS
|
|||||||
parser.file.toLatin1().constData(), parser.line_no);
|
parser.file.toLatin1().constData(), parser.line_no);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (args.first() == "recursive") {
|
if (args.first() == "host_build") {
|
||||||
recursive = true;
|
|
||||||
} else if (args.first() == "host_build") {
|
|
||||||
if (!host_build && isActiveConfig("cross_compile")) {
|
if (!host_build && isActiveConfig("cross_compile")) {
|
||||||
host_build = true;
|
host_build = true;
|
||||||
need_restart = true;
|
need_restart = true;
|
||||||
|
@ -78,7 +78,6 @@ class QMakeProject
|
|||||||
FunctionBlock *function;
|
FunctionBlock *function;
|
||||||
QHash<QString, FunctionBlock*> testFunctions, replaceFunctions;
|
QHash<QString, FunctionBlock*> testFunctions, replaceFunctions;
|
||||||
|
|
||||||
bool recursive;
|
|
||||||
bool host_build;
|
bool host_build;
|
||||||
bool need_restart;
|
bool need_restart;
|
||||||
bool own_prop;
|
bool own_prop;
|
||||||
@ -175,7 +174,6 @@ public:
|
|||||||
|
|
||||||
void dump() const;
|
void dump() const;
|
||||||
|
|
||||||
bool isRecursive() const { return recursive; }
|
|
||||||
bool isHostBuild() const { return host_build; }
|
bool isHostBuild() const { return host_build; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user