From 14bbab09c158e3eb54169b42c4a303d396a32f0e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 31 Jan 2012 18:36:18 +0100 Subject: introduce ability to build projects for the host system when qmake runs into the new option(host_build) command, it will restart the project evaluation with a host spec. the new default host spec is called default-host (gasp!). it is overridden with the pre-exising -spec / -platform option, while the new -xspec / -xplatform option overrides the pre-existing default spec. specifying -spec but not -xspec will set the xspec, too, so the behavior is backwards-compatible. same for the XQMAKESPEC override read from .qmake.cache and the environment variable. the cleaner solution would be adding -hostspec, to be symmetrical with the override semantics, but that would deviate from configure in turn. Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake/generators/makefile.h') diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 5b64ea68fb..a4ec259bb0 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -187,7 +187,7 @@ protected: //subclasses can use these to query information about how the generator was "run" QString buildArgs(const QString &outdir=QString()); - QString specdir(const QString &outdir=QString()); + QString specdir(const QString &outdir = QString(), int host_build = -1); virtual QStringList &findDependencies(const QString &file); virtual bool doDepends() const { return Option::mkfile::do_deps; } -- cgit v1.2.3 From 2bbd50c6e4b33b342f4d69c587c07afc964a9cb2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 May 2012 16:59:22 +0200 Subject: make 'qmake_all' target of SUBDIRS projects properly recursive so far it would rebuild the makefiles one level down only, which is somewhat arbitrary and not really helpful. Change-Id: I5fe01f379ecc4b210610a674d7df7dfc18131eef Reviewed-by: Joerg Bornemann Reviewed-by: Oswald Buddenhagen --- qmake/generators/makefile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake/generators/makefile.h') diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index a4ec259bb0..64ed2dd30a 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -97,7 +97,7 @@ protected: void writeInstalls(QTextStream &t, const QString &installs, bool noBuild=false); void writeHeader(QTextStream &t); void writeSubDirs(QTextStream &t); - void writeMakeQmake(QTextStream &t); + void writeMakeQmake(QTextStream &t, bool noDummyQmakeAll = false); void writeExtraVariables(QTextStream &t); void writeExtraTargets(QTextStream &t); void writeExtraCompilerTargets(QTextStream &t); -- cgit v1.2.3 From a40469ce57411e2bfa6d31534c0702254e3b4859 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 29 May 2012 10:53:00 +0200 Subject: unobfuscate makefiles re $(CHK_DIR_EXISTS) no need to define an obscure variable for it. just inline it. the assignments are left in for compatibility with hand-written commands. Change-Id: I9bc3914e2c4116f3b8fe00a421ca0f036bb7e214 Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'qmake/generators/makefile.h') diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 64ed2dd30a..44fba2d93b 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -81,6 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString spec; bool init_opath_already, init_already, no_io; QHash init_compiler_already; + QString chkdir; QString build_args(const QString &outdir=QString()); void checkMultipleDefinition(const QString &, const QString &); -- cgit v1.2.3 From 5290f6df89027374248e8c117ceb6f9165370f60 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 May 2012 20:44:01 +0200 Subject: introduce $$QMAKE_CHK_EXISTS_GLUE instead of hard-coding platform differences, use a variable. Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake/generators/makefile.h') diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 44fba2d93b..3a41fb4a9a 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -81,7 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString spec; bool init_opath_already, init_already, no_io; QHash init_compiler_already; - QString chkdir; + QString chkdir, chkglue; QString build_args(const QString &outdir=QString()); void checkMultipleDefinition(const QString &, const QString &); -- cgit v1.2.3 From 575a51663007095c8c4d14295ed6028cc18513f8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 18 May 2012 22:13:51 +0200 Subject: revamp automatic makefile generation for sub-projects instead of making the "real" targets depend on the makefiles, add conditional makefile generation to the targets themselves. this causes makefile generation to follow the recursion order determined by the project, which is important when dealing with prl and module pri files. a side effect of this is that qmake and make calls are interleaved now, which is entirely different from a 'qmake -r' run. on the downside, calling make with multiple targets which operate on the same subprojects without prior makefile generation will make a mess, as the qmake calls will be racing. this should be no problem, as qmake does not generate recursive targets where this would be useful - at least by default. it is not sufficient to just order the creation of the makefiles non-recursively (e.g., by using gnu-specific order-only-prerequisites), as an interrupted and subsequently resumed build would happily skip the nested makefiles. workable alternative approaches would be walking the entire tree in a pre-pass to ensure makefile presence (which is incredibly slow) or creating additional stamp files only after recursing and having the makefiles depend on them (which is ugly). Task-number: QTBUG-23376 Reviewed-by: Joerg Bornemann Change-Id: I88d3e7610215677d362026de316513d3bea04b06 --- qmake/generators/makefile.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qmake/generators/makefile.h') diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 3a41fb4a9a..33602dcf80 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -81,7 +81,7 @@ class MakefileGenerator : protected QMakeSourceFileInfo QString spec; bool init_opath_already, init_already, no_io; QHash init_compiler_already; - QString chkdir, chkglue; + QString chkdir, chkfile, chkglue; QString build_args(const QString &outdir=QString()); void checkMultipleDefinition(const QString &, const QString &); @@ -128,6 +128,9 @@ protected: SubTargetsNoFlags=0x00 }; QList findSubDirsSubTargets() const; + void writeSubTargetCall(QTextStream &t, + const QString &in_directory, const QString &in, const QString &out_directory, const QString &out, + const QString &out_directory_cdin, const QString &makefilein, const QString &out_directory_cdout); virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin, const QString &makeFileIn, const QString &outDirectory_cdout); void writeSubTargets(QTextStream &t, QList subtargets, int flags); -- cgit v1.2.3