summaryrefslogtreecommitdiffstats
path: root/qmake/generators/unix
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-08-18 18:07:57 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-01 16:19:53 +0000
commit119cb65017680fcf5b480fedd516256196b7d78e (patch)
tree23d0585758bd8bbe6e437c81284e798f259566f3 /qmake/generators/unix
parentba9f4942b0813f135d2c7208ea27a03cd5c1cae5 (diff)
remove support for CONFIG+=compile_libtool
"why not use libtool?" -- sam "srsly dude?!" -- ossi [ChangeLog][qmake] Support for CONFIG+=compile_libtool was removed. Use CONFIG+=create_libtool and/or custom compilers instead. in addition to its utter insanity and superfluousness, this feature was apparently quite broken anyway (QTBUG-35745). Change-Id: I8147a2953f5f065735ae3a2206cd5d33a7c1809a Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r--qmake/generators/unix/unixmake.cpp73
-rw-r--r--qmake/generators/unix/unixmake2.cpp37
2 files changed, 10 insertions, 100 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 3b0080313b..2b69e8fad9 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -50,8 +50,6 @@ UnixMakefileGenerator::init()
project->values("ICON") = project->values("RC_FILE");
if(project->isEmpty("QMAKE_EXTENSION_PLUGIN"))
project->values("QMAKE_EXTENSION_PLUGIN").append(project->first("QMAKE_EXTENSION_SHLIB"));
- if(project->isEmpty("QMAKE_LIBTOOL"))
- project->values("QMAKE_LIBTOOL").append("libtool --silent");
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
@@ -144,8 +142,6 @@ UnixMakefileGenerator::init()
if(project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS"))
include_deps = true; //do not generate deps
- if(project->isActiveConfig("compile_libtool"))
- Option::obj_ext = ".lo"; //override the .o
MakefileGenerator::init();
@@ -225,7 +221,7 @@ UnixMakefileGenerator::init()
project->values(runCompImp).append("$(" + compiler + ") " + compile_flag + " " + var("QMAKE_CC_O_FLAG") + "\"$@\" \"$<\"");
}
- if (project->isActiveConfig("mac") && !project->isEmpty("TARGET") && !project->isActiveConfig("compile_libtool") &&
+ if (project->isActiveConfig("mac") && !project->isEmpty("TARGET") &&
((project->isActiveConfig("build_pass") || project->isEmpty("BUILDS")))) {
ProString bundle;
if(project->isActiveConfig("bundle") && !project->isEmpty("QMAKE_BUNDLE_EXTENSION")) {
@@ -302,49 +298,6 @@ UnixMakefileGenerator::init()
project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_AR_SUBLIBS";
}
}
-
- if(project->isActiveConfig("compile_libtool")) {
- static const char * const libtoolify[] = {
- "QMAKE_RUN_CC", "QMAKE_RUN_CC_IMP", "QMAKE_RUN_CXX", "QMAKE_RUN_CXX_IMP",
- "QMAKE_LINK_THREAD", "QMAKE_LINK", "QMAKE_AR_CMD", "QMAKE_LINK_SHLIB_CMD", 0
- };
- for (int i = 0; libtoolify[i]; i++) {
- ProStringList &l = project->values(libtoolify[i]);
- if(!l.isEmpty()) {
- QString libtool_flags, comp_flags;
- if (!strncmp(libtoolify[i], "QMAKE_LINK", 10) || !strcmp(libtoolify[i], "QMAKE_AR_CMD")) {
- libtool_flags += " --mode=link";
- if(project->isActiveConfig("staticlib")) {
- libtool_flags += " -static";
- } else {
- if(!project->isEmpty("QMAKE_LIB_FLAG")) {
- int maj = project->first("VER_MAJ").toInt();
- int min = project->first("VER_MIN").toInt();
- int pat = project->first("VER_PAT").toInt();
- comp_flags += " -version-info " + QString::number(10*maj + min) +
- ":" + QString::number(pat) + ":0";
- if (strcmp(libtoolify[i], "QMAKE_AR_CMD")) {
- QString rpath = Option::output_dir;
- if(!project->isEmpty("DESTDIR")) {
- rpath = project->first("DESTDIR").toQString();
- if(QDir::isRelativePath(rpath))
- rpath.prepend(Option::output_dir + Option::dir_sep);
- }
- comp_flags += " -rpath " + escapeFilePath(Option::fixPathToTargetOS(rpath, false));
- }
- }
- }
- if(project->isActiveConfig("plugin"))
- libtool_flags += " -module";
- } else {
- libtool_flags += " --mode=compile";
- }
- l.first().prepend("$(LIBTOOL)" + libtool_flags + " ");
- if(!comp_flags.isEmpty())
- l.first() += comp_flags;
- }
- }
- }
}
QStringList
@@ -462,17 +415,6 @@ UnixMakefileGenerator::findLibraries()
}
}
}
- if (!found && project->isActiveConfig("compile_libtool")) {
- for (int dep_i = 0; dep_i < libdirs.size(); ++dep_i) {
- if (exists(libdirs[dep_i].local() + '/'
- + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext)) {
- (*it) = libdirs[dep_i].real() + Option::dir_sep
- + project->first("QMAKE_PREFIX_SHLIB") + lib + Option::libtool_ext;
- found = true;
- break;
- }
- }
- }
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
if (opt.length() == 10)
++it;
@@ -654,16 +596,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
uninst.append("-$(DEL_FILE) " + dst);
}
- if (bundle == NoBundle && project->isActiveConfig("compile_libtool")) {
- QString src_targ = escapeFilePath(target);
- if(src_targ == "$(TARGET)")
- src_targ = "$(TARGETL)";
- QString dst_dir = fileFixify(targetdir, FileFixifyAbsolute);
- if(QDir::isRelativePath(dst_dir))
- dst_dir = Option::fixPathToTargetOS(Option::output_dir + Option::dir_sep + dst_dir);
- ret = "-$(LIBTOOL) --mode=install cp " + src_targ + ' ' + escapeFilePath(filePrefixRoot(root, dst_dir));
- uninst.append("-$(LIBTOOL) --mode=uninstall " + src_targ);
- } else {
+ {
QString src_targ = target;
if(!destdir.isEmpty())
src_targ = Option::fixPathToTargetOS(destdir + target, false);
@@ -781,7 +714,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
if(type == "prl" && project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") &&
!project->isEmpty("QMAKE_INTERNAL_PRL_FILE"))
meta = prlFileName(false);
- if(type == "libtool" && project->isActiveConfig("create_libtool") && !project->isActiveConfig("compile_libtool"))
+ if (type == "libtool" && project->isActiveConfig("create_libtool"))
meta = libtoolFileName(false);
if(type == "pkgconfig" && project->isActiveConfig("create_pc"))
meta = pkgConfigFileName(false);
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 4babd728ff..cd4339edec 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -53,13 +53,8 @@ UnixMakefileGenerator::writePrlFile(QTextStream &t)
{
MakefileGenerator::writePrlFile(t);
// libtool support
-
if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") { //write .la
- if(project->isActiveConfig("compile_libtool"))
- warn_msg(WarnLogic, "create_libtool specified with compile_libtool can lead to conflicting .la\n"
- "formats, create_libtool has been disabled\n");
- else
- writeLibtoolFile();
+ writeLibtoolFile();
}
// pkg-config support
if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
@@ -214,8 +209,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "AR = " << var("QMAKE_AR") << endl;
t << "RANLIB = " << var("QMAKE_RANLIB") << endl;
- if(project->isActiveConfig("compile_libtool"))
- t << "LIBTOOL = " << var("QMAKE_LIBTOOL") << endl;
t << "SED = " << var("QMAKE_STREAM_EDITOR") << endl;
t << "STRIP = " << var("QMAKE_STRIP") << endl;
@@ -274,8 +267,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
// comment is also important as otherwise quoted use of "$(DESTDIR)" would include this
// spacing.
t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n";
- if(project->isActiveConfig("compile_libtool"))
- t << "TARGETL = " << fileVar("TARGET_la") << endl;
t << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use!
if(project->isActiveConfig("plugin")) {
t << "TARGETD = " << fileVar("TARGET") << endl;
@@ -600,10 +591,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_PRE_LINK"))
t << "\n\t" << var("QMAKE_PRE_LINK");
- if(project->isActiveConfig("compile_libtool")) {
- t << "\n\t"
- << var("QMAKE_LINK_SHLIB_CMD");
- } else if(project->isActiveConfig("plugin")) {
+ if (project->isActiveConfig("plugin")) {
t << "\n\t"
<< "-$(DEL_FILE) $(TARGET)\n\t"
<< var("QMAKE_LINK_SHLIB_CMD");
@@ -747,8 +735,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
writeMakeQmake(t);
if(project->isEmpty("QMAKE_FAILED_REQUIREMENTS") && !project->isActiveConfig("no_autoqmake")) {
QStringList meta_files;
- if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib" &&
- !project->isActiveConfig("compile_libtool")) { //libtool
+ if (project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") { //libtool
meta_files += libtoolFileName();
}
if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib") { //pkg-config
@@ -983,10 +970,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
t << "clean:" << clean_targets << "\n\t";
if(!project->isEmpty("OBJECTS")) {
- if(project->isActiveConfig("compile_libtool"))
- t << "-$(LIBTOOL) --mode=clean $(DEL_FILE) $(OBJECTS)\n\t";
- else
- t << "-$(DEL_FILE) $(OBJECTS)\n\t";
+ t << "-$(DEL_FILE) $(OBJECTS)\n\t";
}
if(doPrecompiledHeaders() && !project->isEmpty("PRECOMPILED_HEADER")) {
ProStringList precomp_files;
@@ -1043,8 +1027,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("QMAKE_BUNDLE")) {
QString bundlePath = escapeFilePath(destdir + project->first("QMAKE_BUNDLE"));
t << "\t-$(DEL_FILE) -r " << bundlePath << endl;
- } else if(project->isActiveConfig("compile_libtool")) {
- t << "\t-$(LIBTOOL) --mode=clean $(DEL_FILE) $(TARGET)\n";
} else if (project->isActiveConfig("staticlib") || project->isActiveConfig("plugin")) {
t << "\t-$(DEL_FILE) " << escapeFilePath(destdir) << "$(TARGET) \n";
} else if (project->values("QMAKE_APP_FLAG").isEmpty()) {
@@ -1185,17 +1167,13 @@ void UnixMakefileGenerator::init2()
} else {
project->values("TARGETA").append(project->first("DESTDIR") + project->first("QMAKE_PREFIX_STATICLIB")
+ project->first("TARGET") + "." + project->first("QMAKE_EXTENSION_STATICLIB"));
- if(project->isActiveConfig("compile_libtool"))
- project->values("TARGET_la") = ProStringList(project->first("DESTDIR") + "lib" + project->first("TARGET") + Option::libtool_ext);
ProStringList &ar_cmd = project->values("QMAKE_AR_CMD");
if (!ar_cmd.isEmpty())
ar_cmd[0] = ar_cmd.at(0).toQString().replace("(TARGET)","(TARGETA)");
else
ar_cmd.append("$(AR) $(TARGETA) $(OBJECTS)");
- if(project->isActiveConfig("compile_libtool")) {
- project->values("TARGET") = project->values("TARGET_la");
- } else if(!project->isEmpty("QMAKE_BUNDLE")) {
+ if (!project->isEmpty("QMAKE_BUNDLE")) {
ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
if(!bundle_loc.isEmpty() && !bundle_loc.startsWith("/"))
bundle_loc.prepend("/");
@@ -1349,7 +1327,7 @@ void UnixMakefileGenerator::init2()
project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
- if(project->isActiveConfig("plugin_with_soname") && !project->isActiveConfig("compile_libtool"))
+ if (project->isActiveConfig("plugin_with_soname"))
project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
} else {
project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
@@ -1368,8 +1346,7 @@ void UnixMakefileGenerator::init2()
project->first("VER_MIN") + "." +
project->first("VER_PAT"));
}
- if(!project->isActiveConfig("compile_libtool"))
- project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
+ project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SONAME");
}
}