diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index f7097e58dc2..6b08a2dd28f 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -155,6 +155,20 @@ UnixMakefileGenerator::writeSubTargets(QTextStream &t, QList= '0' && c <= '9') || (c >= 'A' && c <= 'Z') + || (c >= 'a' && c <= 'z') || c == '-' || c == '.'; + if (!okChar) + ch = QChar::fromLatin1('-'); + } + return s; +} + void UnixMakefileGenerator::writeMakeParts(QTextStream &t) { @@ -826,7 +840,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (bundleIdentifier.endsWith(".framework")) bundleIdentifier.chop(10); // replace invalid bundle id characters - bundleIdentifier.replace('_', '-'); + bundleIdentifier = rfc1034Identifier(bundleIdentifier); commonSedArgs << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" "; if (!isFramework) {