summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-10-25 14:32:09 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-28 08:39:07 +0100
commit5dcc36b15c479f532ffd0b5c1330e683fcf8781e (patch)
tree3905c0e38dde332e253c3e3c967bbc32022d4b57
parent24539dc3d8054e7cb6862e5601586f837d1e21c3 (diff)
Add a -libexecdir option to the configures
User applications are those that users run directly, whether it be for development or not. The executable binaries that the user does not usually run but is still required for proper functioning are called "program executables" in Autoconf and they are placed in libexec. This commit adds support for "program executables" in Qt by adding the -libexecdir option to the configures, the qmake variable QT_INSTALL_LIBEXECS (note the plural, to match all other properties), and QLibraryInfo::LibraryExecutables. At the time of this commit, the only expected "program executable" is the QtWebProcess, the WebKit2 helper process from QtWebKit. Change-Id: I66c3a3e0cf7f9d93b5f88f55f18e957faff608fc Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rwxr-xr-xconfigure16
-rw-r--r--mkspecs/features/qt_config.prf2
-rw-r--r--mkspecs/features/qt_module.prf1
-rw-r--r--mkspecs/features/qt_module_fwdpri.prf3
-rw-r--r--qmake/property.cpp1
-rw-r--r--src/corelib/global/qlibraryinfo.cpp4
-rw-r--r--src/corelib/global/qlibraryinfo.h1
-rw-r--r--tools/configure/configureapp.cpp14
8 files changed, 37 insertions, 5 deletions
diff --git a/configure b/configure
index 303244315a..e8334946d1 100755
--- a/configure
+++ b/configure
@@ -881,6 +881,7 @@ QT_INSTALL_DOCS=
QT_INSTALL_HEADERS=
QT_INSTALL_LIBS=
QT_INSTALL_BINS=
+QT_INSTALL_LIBEXECS=
QT_INSTALL_PLUGINS=
QT_INSTALL_IMPORTS=
QT_INSTALL_QML=
@@ -993,7 +994,7 @@ while [ "$#" -gt 0 ]; do
VAL=no
;;
#Qt style options that pass an argument
- -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
+ -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
shift
VAL="$1"
@@ -1250,6 +1251,9 @@ while [ "$#" -gt 0 ]; do
bindir)
QT_INSTALL_BINS="$VAL"
;;
+ libexecdir)
+ QT_INSTALL_LIBEXECS="$VAL"
+ ;;
sse)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SSE="$VAL"
@@ -2805,6 +2809,11 @@ if [ -z "$QT_INSTALL_BINS" ]; then #default
fi
QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
+if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default
+ QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/libexec" #fallback
+fi
+QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"`
+
if [ -z "$QT_INSTALL_DOCS" ]; then #default
QT_INSTALL_DOCS="$QT_INSTALL_DATA/doc" #fallback
fi
@@ -3012,7 +3021,7 @@ Installation options:
You may use these to separate different parts of the install:
- -bindir <dir> ......... Executables will be installed to <dir>
+ -bindir <dir> ......... User executables will be installed to <dir>
(default PREFIX/bin)
-headerdir <dir> ...... Headers will be installed to <dir>
(default PREFIX/include)
@@ -3022,6 +3031,8 @@ Installation options:
(default PREFIX)
-plugindir <dir> ...... Plugins will be installed to <dir>
(default ARCHDATADIR/plugins)
+ -libexecdir <dir> ..... Program executables will be installed to <dir>
+ (default ARCHDATADIR/libexec)
-importdir <dir> ...... Imports for QML1 will be installed to <dir>
(default ARCHDATADIR/imports)
-qmldir <dir> ......... Imports for QML2 will be installed to <dir>
@@ -3506,6 +3517,7 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
"qt_docspath=$QT_INSTALL_DOCS",
"qt_hdrspath=$QT_INSTALL_HEADERS",
"qt_libspath=$QT_INSTALL_LIBS",
+ "qt_lbexpath=$QT_INSTALL_LIBEXECS",
"qt_binspath=$QT_INSTALL_BINS",
"qt_plugpath=$QT_INSTALL_PLUGINS",
"qt_impspath=$QT_INSTALL_IMPORTS",
diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf
index 5d250ea346..3b2b62e139 100644
--- a/mkspecs/features/qt_config.prf
+++ b/mkspecs/features/qt_config.prf
@@ -19,6 +19,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
QT_MODULE_INCLUDE_BASE = $$[QT_INSTALL_HEADERS]
QT_MODULE_LIB_BASE = $$[QT_INSTALL_LIBS]
QT_MODULE_PLUGIN_BASE = $$[QT_INSTALL_PLUGINS]
+ QT_MODULE_LIBEXEC_BASE = $$[QT_INSTALL_LIBEXECS]
QT_MODULE_BIN_BASE = $$[QT_INSTALL_BINS]
QT_MODULE_IMPORT_BASE = $$[QT_INSTALL_IMPORTS]
QT_MODULE_QML_BASE = $$[QT_INSTALL_QML]
@@ -28,6 +29,7 @@ QMAKE_QT_CONFIG = $$[QT_HOST_DATA/get]/mkspecs/qconfig.pri
unset(QT_MODULE_INCLUDE_BASE)
unset(QT_MODULE_LIB_BASE)
unset(QT_MODULE_PLUGIN_BASE)
+ unset(QT_MODULE_LIBEXEC_BASE)
unset(QT_MODULE_BIN_BASE)
unset(QT_MODULE_IMPORT_BASE)
unset(QT_MODULE_QML_BASE)
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index ca62923083..a4f324312d 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -79,6 +79,7 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \
"QT.$${MODULE}.sources = $$val_escape(_PRO_FILE_PWD_)" \
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
+ "QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
"QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
diff --git a/mkspecs/features/qt_module_fwdpri.prf b/mkspecs/features/qt_module_fwdpri.prf
index cd3aed9e0f..b7270aea59 100644
--- a/mkspecs/features/qt_module_fwdpri.prf
+++ b/mkspecs/features/qt_module_fwdpri.prf
@@ -54,6 +54,7 @@
"QT_MODULE_IMPORT_BASE = $$MODULE_BASE_OUTDIR/imports" \
"QT_MODULE_QML_BASE = $$MODULE_BASE_OUTDIR/qml" \
"QT_MODULE_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
+ "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
$$module_rpathlink \
$$module_rpathlink_priv \
@@ -70,7 +71,7 @@
include($$MODULE_FWD_PRI)
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
name depends private_depends module_config CONFIG DEFINES sources \
- includes private_includes bins libs plugins imports qml \
+ includes private_includes bins libs libexecs plugins imports qml \
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
cache(QT_CONFIG, transient)
diff --git a/qmake/property.cpp b/qmake/property.cpp
index 8379b2a58c..d9e861c2e6 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -61,6 +61,7 @@ static const struct {
{ "QT_INSTALL_DOCS", QLibraryInfo::DocumentationPath, false },
{ "QT_INSTALL_HEADERS", QLibraryInfo::HeadersPath, false },
{ "QT_INSTALL_LIBS", QLibraryInfo::LibrariesPath, false },
+ { "QT_INSTALL_LIBEXECS", QLibraryInfo::LibraryExecutablesPath, false },
{ "QT_INSTALL_BINS", QLibraryInfo::BinariesPath, false },
{ "QT_INSTALL_TESTS", QLibraryInfo::TestsPath, false },
{ "QT_INSTALL_PLUGINS", QLibraryInfo::PluginsPath, false },
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index a756577311..a8dc086b55 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -267,12 +267,13 @@ QLibraryInfo::isDebugBuild()
*/
static const struct {
- char key[14], value[13];
+ char key[19], value[13];
} qtConfEntries[] = {
{ "Prefix", "." },
{ "Documentation", "doc" }, // should be ${Data}/doc
{ "Headers", "include" },
{ "Libraries", "lib" },
+ { "LibraryExecutables", "libexec" }, // should be ${ArchData}/libexec
{ "Binaries", "bin" },
{ "Plugins", "plugins" }, // should be ${ArchData}/plugins
{ "Imports", "imports" }, // should be ${ArchData}/imports
@@ -452,6 +453,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
\value DocumentationPath The location for documentation upon install.
\value HeadersPath The location for all headers.
\value LibrariesPath The location of installed libraries.
+ \value LibraryExecutablesPath The location of installed executables required by libraries at runtime.
\value BinariesPath The location of installed Qt binaries (tools and applications).
\value PluginsPath The location of installed Qt plugins.
\value ImportsPath The location of installed QML extensions to import (QML 1.x).
diff --git a/src/corelib/global/qlibraryinfo.h b/src/corelib/global/qlibraryinfo.h
index 5d6e42965f..a574b4b04a 100644
--- a/src/corelib/global/qlibraryinfo.h
+++ b/src/corelib/global/qlibraryinfo.h
@@ -67,6 +67,7 @@ public:
DocumentationPath,
HeadersPath,
LibrariesPath,
+ LibraryExecutablesPath,
BinariesPath,
PluginsPath,
ImportsPath,
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index a08989d157..0093fbcd47 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1033,6 +1033,13 @@ void Configure::parseCmdLine()
dictionary[ "QT_INSTALL_BINS" ] = configCmdLine.at(i);
}
+ else if (configCmdLine.at(i) == "-libexecdir") {
+ ++i;
+ if (i == argCount)
+ break;
+ dictionary[ "QT_INSTALL_LIBEXECS" ] = configCmdLine.at(i);
+ }
+
else if (configCmdLine.at(i) == "-libdir") {
++i;
if (i == argCount)
@@ -1597,10 +1604,11 @@ bool Configure::displayHelp()
desc("You may use these to separate different parts of the install:\n\n");
- desc( "-bindir <dir>", "Executables will be installed to <dir>\n(default PREFIX/bin)");
+ desc( "-bindir <dir>", "User executables will be installed to <dir>\n(default PREFIX/bin)");
desc( "-libdir <dir>", "Libraries will be installed to <dir>\n(default PREFIX/lib)");
desc( "-headerdir <dir>", "Headers will be installed to <dir>\n(default PREFIX/include)");
desc( "-archdatadir <dir>", "Architecture-dependent data used by Qt will be installed to <dir>\n(default PREFIX)");
+ desc( "-libexecdir <dir>", "Program executables will be installed to <dir>\n(default ARCHDATADIR/libexec)");
desc( "-plugindir <dir>", "Plugins will be installed to <dir>\n(default ARCHDATADIR/plugins)");
desc( "-importdir <dir>", "Imports for QML1 will be installed to <dir>\n(default ARCHDATADIR/imports)");
desc( "-qmldir <dir>", "Imports for QML2 will be installed to <dir>\n(default ARCHDATADIR/qml)");
@@ -3423,6 +3431,7 @@ void Configure::displayConfig()
sout << "Libraries installed to......" << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBS"]) << endl;
sout << "Arch-dep. data to..........." << QDir::toNativeSeparators(dictionary["QT_INSTALL_ARCHDATA"]) << endl;
sout << "Plugins installed to........" << QDir::toNativeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << endl;
+ sout << "Library execs installed to.." << QDir::toNativeSeparators(dictionary["QT_INSTALL_LIBEXEC"]) << endl;
sout << "QML1 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << endl;
sout << "QML2 imports installed to..." << QDir::toNativeSeparators(dictionary["QT_INSTALL_QML"]) << endl;
sout << "Binaries installed to......." << QDir::toNativeSeparators(dictionary["QT_INSTALL_BINS"]) << endl;
@@ -3554,6 +3563,8 @@ void Configure::generateQConfigCpp()
dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib";
if (!dictionary["QT_INSTALL_ARCHDATA"].size())
dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
+ if (!dictionary["QT_INSTALL_LIBEXECS"].size())
+ dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec";
if (!dictionary["QT_INSTALL_BINS"].size())
dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin";
if (!dictionary["QT_INSTALL_PLUGINS"].size())
@@ -3606,6 +3617,7 @@ void Configure::generateQConfigCpp()
<< " \"qt_docspath=" << formatPath(dictionary["QT_INSTALL_DOCS"]) << "\"," << endl
<< " \"qt_hdrspath=" << formatPath(dictionary["QT_INSTALL_HEADERS"]) << "\"," << endl
<< " \"qt_libspath=" << formatPath(dictionary["QT_INSTALL_LIBS"]) << "\"," << endl
+ << " \"qt_lbexpath=" << formatPath(dictionary["QT_INSTALL_LIBEXECS"]) << "\"," << endl
<< " \"qt_binspath=" << formatPath(dictionary["QT_INSTALL_BINS"]) << "\"," << endl
<< " \"qt_plugpath=" << formatPath(dictionary["QT_INSTALL_PLUGINS"]) << "\"," << endl
<< " \"qt_impspath=" << formatPath(dictionary["QT_INSTALL_IMPORTS"]) << "\"," << endl