Fix Makefile re-generation for debug_and_release builds
Re-generation of the Makefile depends on a correctly set up QMAKE_INTERNAL_INCLUDED_FILES variable. In debug_and_release builds this variable is set up for Makefile.Debug and Makefile.Release, but not for the meta Makefile. However, that's where the Makefile re-generation target is located. We now collect the contents of QMAKE_INTERNAL_INCLUDED_FILES for Makefile.Debug/Release and use that for the meta Makefile. Fixes: QTBUG-13334 Change-Id: I6124a91447d5c54d51680e23570c4e97f44e6a73 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
1932754e90
commit
97d6517114
@ -57,6 +57,7 @@ private:
|
|||||||
QList<Build *> makefiles;
|
QList<Build *> makefiles;
|
||||||
void clearBuilds();
|
void clearBuilds();
|
||||||
MakefileGenerator *processBuild(const ProString &);
|
MakefileGenerator *processBuild(const ProString &);
|
||||||
|
void accumulateVariableFromBuilds(const ProKey &name, Build *build) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
@ -185,6 +186,7 @@ BuildsMetaMakefileGenerator::write()
|
|||||||
if(!build->makefile) {
|
if(!build->makefile) {
|
||||||
ret = false;
|
ret = false;
|
||||||
} else if(build == glue) {
|
} else if(build == glue) {
|
||||||
|
accumulateVariableFromBuilds("QMAKE_INTERNAL_INCLUDED_FILES", build);
|
||||||
ret = build->makefile->writeProjectMakefile();
|
ret = build->makefile->writeProjectMakefile();
|
||||||
} else {
|
} else {
|
||||||
ret = build->makefile->write();
|
ret = build->makefile->write();
|
||||||
@ -227,6 +229,16 @@ MakefileGenerator
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BuildsMetaMakefileGenerator::accumulateVariableFromBuilds(const ProKey &name, Build *dst) const
|
||||||
|
{
|
||||||
|
ProStringList &values = dst->makefile->projectFile()->values(name);
|
||||||
|
for (auto build : makefiles) {
|
||||||
|
if (build != dst)
|
||||||
|
values += build->makefile->projectFile()->values(name);
|
||||||
|
}
|
||||||
|
values.removeDuplicates();
|
||||||
|
}
|
||||||
|
|
||||||
class SubdirsMetaMakefileGenerator : public MetaMakefileGenerator
|
class SubdirsMetaMakefileGenerator : public MetaMakefileGenerator
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user