introduce -fully-process configure option, change behavior of -process

configure will now run qmake without -recursive, as on modern systems
one can get a lot more out of parallelization done by make, which qmake
cannot do.
use -fully-process to get back the old behavior. -dont-process is
unchanged.

Change-Id: I2874321a963175463ae8992f3ab2b01bc13c9922
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2012-08-02 15:37:50 +02:00 committed by Qt by Nokia
parent 051f97f350
commit 5fae23eb26
2 changed files with 31 additions and 15 deletions

22
configure vendored
View File

@ -814,7 +814,7 @@ CFG_SILENT=no
CFG_ALSA=auto CFG_ALSA=auto
CFG_PULSEAUDIO=auto CFG_PULSEAUDIO=auto
CFG_COREWLAN=auto CFG_COREWLAN=auto
CFG_NOPROCESS=no CFG_PROCESS=yes
CFG_ICU=auto CFG_ICU=auto
CFG_FORCE_ASSERTS=no CFG_FORCE_ASSERTS=no
CFG_PCRE=auto CFG_PCRE=auto
@ -1969,10 +1969,13 @@ while [ "$#" -gt 0 ]; do
CFG_SILENT="$VAL" CFG_SILENT="$VAL"
;; ;;
dont-process) dont-process)
CFG_NOPROCESS=yes CFG_PROCESS=no
;; ;;
process) process)
CFG_NOPROCESS=no CFG_PROCESS=partial
;;
fully-process)
CFG_PROCESS=full
;; ;;
audio-backend) audio-backend)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
@ -2985,6 +2988,10 @@ Configure options:
* -shared ............ Create and use shared Qt libraries. * -shared ............ Create and use shared Qt libraries.
-static ............ Create and use static Qt libraries. -static ............ Create and use static Qt libraries.
* -process ........... Generate only a top-level Makefile.
-fully-process ..... Generate Makefiles for the entire Qt tree.
-dont-process ...... Do not generate any Makefiles.
* -no-fast ........... Configure Qt normally by generating Makefiles for all * -no-fast ........... Configure Qt normally by generating Makefiles for all
project files. project files.
-fast .............. Configure Qt quickly by generating Makefiles only for -fast .............. Configure Qt quickly by generating Makefiles only for
@ -6185,10 +6192,15 @@ EXEC=""
# build makefiles based on the configuration # build makefiles based on the configuration
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
if [ "$CFG_NOPROCESS" != "yes" ]; then if [ "$CFG_PROCESS" != "no" ]; then
if [ "$CFG_PROCESS" = "full" ]; then
echo "Creating makefiles. Please wait..." echo "Creating makefiles. Please wait..."
"$outpath/bin/qmake" -r ${OPT_FAST+CONFIG+=fast} "$relpath" "$outpath/bin/qmake" -r "$relpath"
echo "Done" echo "Done"
else
"$outpath/bin/qmake" "$relpath"
fi
if [ "$OPT_FAST" = "yes" ]; then if [ "$OPT_FAST" = "yes" ]; then
PART_ROOTS= PART_ROOTS=

View File

@ -207,7 +207,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "VCPROJFILES" ] = "yes"; dictionary[ "VCPROJFILES" ] = "yes";
dictionary[ "QMAKE_INTERNAL" ] = "no"; dictionary[ "QMAKE_INTERNAL" ] = "no";
dictionary[ "FAST" ] = "no"; dictionary[ "FAST" ] = "no";
dictionary[ "NOPROCESS" ] = "no"; dictionary[ "PROCESS" ] = "partial";
dictionary[ "WIDGETS" ] = "yes"; dictionary[ "WIDGETS" ] = "yes";
dictionary[ "RTTI" ] = "yes"; dictionary[ "RTTI" ] = "yes";
dictionary[ "SSE2" ] = "auto"; dictionary[ "SSE2" ] = "auto";
@ -899,9 +899,11 @@ void Configure::parseCmdLine()
dictionary[ "BUILD_QMAKE" ] = "yes"; dictionary[ "BUILD_QMAKE" ] = "yes";
else if (configCmdLine.at(i) == "-dont-process") else if (configCmdLine.at(i) == "-dont-process")
dictionary[ "NOPROCESS" ] = "yes"; dictionary[ "PROCESS" ] = "no";
else if (configCmdLine.at(i) == "-process") else if (configCmdLine.at(i) == "-process")
dictionary[ "NOPROCESS" ] = "no"; dictionary[ "PROCESS" ] = "partial";
else if (configCmdLine.at(i) == "-fully-process")
dictionary[ "PROCESS" ] = "full";
else if (configCmdLine.at(i) == "-no-qmake-deps") else if (configCmdLine.at(i) == "-no-qmake-deps")
dictionary[ "DEPENDENCIES" ] = "no"; dictionary[ "DEPENDENCIES" ] = "no";
@ -1724,8 +1726,9 @@ bool Configure::displayHelp()
desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake."); desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake.");
desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n"); desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n");
desc("NOPROCESS", "yes", "-dont-process", "Do not generate Makefiles/Project files. This will override -no-fast if specified."); desc("PROCESS", "partial", "-process", "Generate top-level Makefiles/Project files.\n");
desc("NOPROCESS", "no", "-process", "Generate Makefiles/Project files.\n"); desc("PROCESS", "full", "-fully-process", "Generate Makefiles/Project files for the entire Qt tree.\n");
desc("PROCESS", "no", "-dont-process", "Do not generate Makefiles/Project files. This will override -no-fast if specified.");
desc("RTTI", "no", "-no-rtti", "Do not compile runtime type information."); desc("RTTI", "no", "-no-rtti", "Do not compile runtime type information.");
desc("RTTI", "yes", "-rtti", "Compile runtime type information.\n"); desc("RTTI", "yes", "-rtti", "Compile runtime type information.\n");
@ -3561,7 +3564,7 @@ void Configure::buildQmake()
void Configure::findProjects(const QString& dirName) void Configure::findProjects(const QString& dirName)
{ {
if (dictionary[ "NOPROCESS" ] == "no") { if (dictionary[ "PROCESS" ] != "no") {
QDir dir(dirName); QDir dir(dirName);
QString entryName; QString entryName;
int makeListNumber; int makeListNumber;
@ -3612,7 +3615,7 @@ void Configure::appendMakeItem(int inList, const QString &item)
void Configure::generateMakefiles() void Configure::generateMakefiles()
{ {
if (dictionary[ "NOPROCESS" ] == "no") { if (dictionary[ "PROCESS" ] != "no") {
QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; QString spec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ];
if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince"))) if (spec != "win32-msvc.net" && !spec.startsWith("win32-msvc2") && !spec.startsWith(QLatin1String("wince")))
dictionary[ "VCPROJFILES" ] = "no"; dictionary[ "VCPROJFILES" ] = "no";
@ -3640,6 +3643,7 @@ void Configure::generateMakefiles()
printf("Generating Makefiles...\n"); printf("Generating Makefiles...\n");
generate = false; // Now Makefiles will be done generate = false; // Now Makefiles will be done
} }
if (dictionary[ "PROCESS" ] == "full")
args << "-r"; args << "-r";
args << (sourcePath + "/qtbase.pro"); args << (sourcePath + "/qtbase.pro");
args << "-o"; args << "-o";