Correct the list of files included in "make dist"

At the very least, include the files named in the sources, like
HEADERS. It was quite surprising to send a tarball that included the
.pro file and the .cpp sources, but none of the headers.

On the other hand, the .qmake.cache file need need not be sent either,
despite being include()d in qmake's processing.

Change-Id: I8f48ca3e8040f954f321f4643b01c0f36aafe2d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Thiago Macieira 2014-07-16 18:43:44 -07:00
parent 1f4b958438
commit 67665e7763
3 changed files with 6 additions and 1 deletions

View File

@ -111,6 +111,8 @@ UnixMakefileGenerator::init()
QString sroot = project->sourceRoot(); QString sroot = project->sourceRoot();
foreach (const ProString &iif, project->values("QMAKE_INTERNAL_INCLUDED_FILES")) { foreach (const ProString &iif, project->values("QMAKE_INTERNAL_INCLUDED_FILES")) {
if (iif == project->cacheFile())
continue;
if (iif.startsWith(sroot) && iif.at(sroot.length()) == QLatin1Char('/')) if (iif.startsWith(sroot) && iif.at(sroot.length()) == QLatin1Char('/'))
project->values("DISTFILES") += fileFixify(iif.toQString(), FileFixifyRelative); project->values("DISTFILES") += fileFixify(iif.toQString(), FileFixifyRelative);
} }

View File

@ -278,6 +278,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(do_incremental && !src_incremental) if(do_incremental && !src_incremental)
do_incremental = false; do_incremental = false;
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " "
<< valList(escapeFilePaths(project->values("HEADERS"))) << " "
<< valList(escapeFilePaths(project->values("SOURCES"))) << endl; << valList(escapeFilePaths(project->values("SOURCES"))) << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
// The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes

View File

@ -678,7 +678,9 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
writeExtraCompilerVariables(t); writeExtraCompilerVariables(t);
writeExtraVariables(t); writeExtraVariables(t);
t << "DIST = " << varList("DISTFILES") << endl; t << "DIST = " << varList("DISTFILES") << " "
<< varList("HEADERS") << " "
<< varList("SOURCES") << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl; t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
// The comment is important to maintain variable compatibility with Unix // The comment is important to maintain variable compatibility with Unix
// Makefiles, while not interpreting a trailing-slash as a linebreak // Makefiles, while not interpreting a trailing-slash as a linebreak