summaryrefslogtreecommitdiffstats
path: root/qmake/generators/metamakefile.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-22 15:41:35 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-26 13:29:15 (GMT)
commite795e61ef93f8080f9938ac49f2fca306644af85 (patch)
tree9974fbf6a1d84929c6014c450b9f4d3b30e5fb5c /qmake/generators/metamakefile.cpp
parentd7404e4ce890139c1447f892009c8a30f6dd6314 (diff)
downloadQt-e795e61ef93f8080f9938ac49f2fca306644af85.zip
Qt-e795e61ef93f8080f9938ac49f2fca306644af85.tar.gz
Qt-e795e61ef93f8080f9938ac49f2fca306644af85.tar.bz2
add possibility to request project recursion from within a pro file
this is the same as specifying -r on the command line, but it can be set in pro and spec files for cases where no recursion would plain not work. the implementation is via a new option() instruction which at some point will be used to set other "modes of operation" as well. for now, only the "recursive" option is recognized. Reviewed-by: mariusSO
Diffstat (limited to 'qmake/generators/metamakefile.cpp')
-rw-r--r--qmake/generators/metamakefile.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index f48491c..81fd12e 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -293,7 +293,15 @@ SubdirsMetaMakefileGenerator::init()
init_flag = true;
bool hasError = false;
- if(Option::recursive) {
+ // It might make sense to bequeath the CONFIG option to the recursed
+ // 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) {
QString old_output_dir = Option::output_dir;
QString old_output = Option::output.fileName();
QString oldpwd = qmake_getpwd();
@@ -375,7 +383,7 @@ SubdirsMetaMakefileGenerator::init()
Subdir *self = new Subdir;
self->input_dir = qmake_getpwd();
self->output_dir = Option::output_dir;
- if(!Option::recursive || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
+ if(!recurse || (!Option::output.fileName().endsWith(Option::dir_sep) && !QFileInfo(Option::output).isDir()))
self->output_file = Option::output.fileName();
self->makefile = new BuildsMetaMakefileGenerator(project, name, false);
self->makefile->init();