run syncqt only for builds from git

the logic in the configures was even trying to express that, only that
nowadays we always ship syncqt, so the tests were kinda pointless.

this frees us from the perl dependency for non-developer builds of
packaged modules (except for webkit, which needs almost every scripting
language on earth anyway).

obviously, this requires that the packaging scripts run syncqt in the
source dir before tarring up the sources. note that for repositories
other than qtbase, the -version argument needs to be passed to syncqt.

Task-number: QTBUG-29465
Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-05-28 21:34:05 +02:00 committed by The Qt Project
parent 96557bc389
commit 0a1b89bff5
7 changed files with 44 additions and 16 deletions

21
configure vendored
View File

@ -2389,13 +2389,6 @@ fi
if [ "$OPT_SHADOW" = "yes" ]; then if [ "$OPT_SHADOW" = "yes" ]; then
echo "Preparing build tree..." echo "Preparing build tree..."
if [ -z "$PERL" ]; then
echo
echo "You need perl in your PATH to make a shadow build."
echo "Cannot proceed."
exit 1
fi
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin" [ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
# save a pre-existing mkspecs/modules dir # save a pre-existing mkspecs/modules dir
@ -3895,7 +3888,14 @@ fi
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# symlink includes # symlink includes
if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt.pl" ]; then if [ -e "$relpath/.git" ]; then
if [ -z "$PERL" ]; then
echo
echo "You need perl in your PATH to make a build from GIT."
echo "Cannot proceed."
exit 1
fi
"$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1 "$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1
fi fi
@ -4028,6 +4028,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "BUILD_PATH = $adjoutpath" >> "$mkfile" echo "BUILD_PATH = $adjoutpath" >> "$mkfile"
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile" echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
if [ -e "$relpath/.git" ]; then
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
else
echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile"
fi
echo "QMAKESPEC = $adjqmakespec" >> "$mkfile" echo "QMAKESPEC = $adjqmakespec" >> "$mkfile"
echo "QT_VERSION = $QT_VERSION" >> "$mkfile" echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile" echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"

View File

@ -16,6 +16,9 @@ isEmpty(MODULE_BASE_DIR): MODULE_BASE_DIR = $$MODULE_PROFILE_DIR
isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR) isEmpty(MODULE_BASE_OUTDIR): MODULE_BASE_OUTDIR = $$shadowed($$MODULE_BASE_DIR)
isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR isEmpty(MODULE_QMAKE_OUTDIR): MODULE_QMAKE_OUTDIR = $$MODULE_BASE_OUTDIR
exists($$MODULE_PROFILE_DIR/.git): \
CONFIG += git_build
!prefix_build { !prefix_build {
QTDIR = $$[QT_HOST_PREFIX] QTDIR = $$[QT_HOST_PREFIX]
# Permit modules to enforce being built outside QTDIR ... # Permit modules to enforce being built outside QTDIR ...

View File

@ -11,7 +11,7 @@
load(qt_build_paths) load(qt_build_paths)
!build_pass { !build_pass:git_build {
qtPrepareTool(QMAKE_SYNCQT, syncqt) qtPrepareTool(QMAKE_SYNCQT, syncqt)
minimal_syncqt { minimal_syncqt {
QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS QMAKE_SYNCQT += -minimal $$QMAKE_SYNCQT_OPTIONS
@ -29,7 +29,11 @@ load(qt_build_paths)
minimal_syncqt: return() minimal_syncqt: return()
#load up the headers info #load up the headers info
include($$MODULE_BASE_OUTDIR/include/$$MODULE_INCNAME/headers.pri, "", true) git_build: \
INC_PATH = $$MODULE_BASE_OUTDIR
else: \
INC_PATH = $$MODULE_BASE_DIR
include($$INC_PATH/include/$$MODULE_INCNAME/headers.pri, "", true)
autogen_warning = \ autogen_warning = \
"/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_DIR). */" "/* This file was generated by qmake with the info from <root>/$$relative_path($$_PRO_FILE_, $$MODULE_BASE_DIR). */"

View File

@ -56,6 +56,18 @@ else: \
MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \ MODULE_PRIVATE_INCLUDES = \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION \
\$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME \$\$QT_MODULE_INCLUDE_BASE/$$MODULE_INCNAME/$$VERSION/$$MODULE_INCNAME
} }
!git_build:!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
pub_inc = $$replace(MODULE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
priv_inc = $$replace(MODULE_PRIVATE_INCLUDES, ^\\\$\\\$QT_MODULE_INCLUDE_BASE, $$MODULE_BASE_DIR/include)
force_independent {
MODULE_FWD_PRI_CONT_SUFFIX = \
"QT.$${MODULE}.includes += $$pub_inc" \
"QT.$${MODULE}.private_includes += $$priv_inc"
} else {
MODULE_INCLUDES += $$pub_inc
MODULE_PRIVATE_INCLUDES += $$priv_inc
}
}
MODULE_PRI_CONT = \ MODULE_PRI_CONT = \
"QT.$${MODULE}.VERSION = $${VERSION}" \ "QT.$${MODULE}.VERSION = $${VERSION}" \
"QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \ "QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
@ -97,7 +109,8 @@ else: \
"QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \ "QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
"QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \ "QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \ "QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
"include($$MODULE_PRI)" "include($$MODULE_PRI)" \
$$MODULE_FWD_PRI_CONT_SUFFIX
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.") write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
touch($$MODULE_FWD_PRI, $$MODULE_PRI) touch($$MODULE_FWD_PRI, $$MODULE_PRI)
MODULE_PRI_FILES += $$MODULE_FWD_PRI MODULE_PRI_FILES += $$MODULE_FWD_PRI

View File

@ -85,8 +85,8 @@ DEPEND_SRC = \
CPPFLAGS = -g $(EXTRA_CPPFLAGS) \ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
-I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 \ -I$(QMKSRC) -I$(QMKLIBSRC) -I$(QMKSRC)/generators -I$(QMKSRC)/generators/unix -I$(QMKSRC)/generators/win32 \
-I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \ -I$(QMKSRC)/generators/mac -I$(QMKSRC)/generators/integrity \
-I$(BUILD_PATH)/include -I$(BUILD_PATH)/include/QtCore \ -I$(INC_PATH) -I$(INC_PATH)/QtCore \
-I$(BUILD_PATH)/include/QtCore/$(QT_VERSION) -I$(BUILD_PATH)/include/QtCore/$(QT_VERSION)/QtCore \ -I$(INC_PATH)/QtCore/$(QT_VERSION) -I$(INC_PATH)/QtCore/$(QT_VERSION)/QtCore \
-I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \ -I$(BUILD_PATH)/src/corelib/global -DHAVE_QCONFIG_CPP \
-I$(QMAKESPEC) \ -I$(QMAKESPEC) \
-I$(SOURCE_PATH)/tools/shared \ -I$(SOURCE_PATH)/tools/shared \

View File

@ -34,7 +34,7 @@ CFLAGS_BARE = -c -Fo./ \
-W3 -nologo -O1 \ -W3 -nologo -O1 \
$(CFLAGS_EXTRA) \ $(CFLAGS_EXTRA) \
-I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac -I$(QMKSRC)\generators\integrity \ -I$(QMKSRC) -I$(QMKSRC)\library -I$(QMKSRC)\generators -I$(QMKSRC)\generators\unix -I$(QMKSRC)\generators\win32 -I$(QMKSRC)\generators\mac -I$(QMKSRC)\generators\integrity \
-I$(BUILD_PATH)\include -I$(BUILD_PATH)\include\QtCore -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION) -I$(BUILD_PATH)\include\QtCore\$(QT_VERSION)\QtCore \ -I$(INC_PATH) -I$(INC_PATH)\QtCore -I$(INC_PATH)\QtCore\$(QT_VERSION) -I$(INC_PATH)\QtCore\$(QT_VERSION)\QtCore \
-I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \ -I$(BUILD_PATH)\src\corelib\global -DHAVE_QCONFIG_CPP \
-I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \ -I$(SOURCE_PATH)\mkspecs\$(QMAKESPEC) \
-I$(SOURCE_PATH)\tools\shared \ -I$(SOURCE_PATH)\tools\shared \

View File

@ -1987,7 +1987,7 @@ QString Configure::defaultTo(const QString &option)
return "auto"; return "auto";
if (option == "SYNCQT" if (option == "SYNCQT"
&& (!QFile::exists(sourcePath + "/bin/syncqt.pl"))) && (!QFile::exists(sourcePath + "/.git")))
return "no"; return "no";
// Do not actually build the examples in production builds with -prefix, unless requested // Do not actually build the examples in production builds with -prefix, unless requested
@ -3810,7 +3810,10 @@ void Configure::buildQmake()
QTextStream stream(&out); QTextStream stream(&out);
stream << "#AutoGenerated by configure.exe" << endl stream << "#AutoGenerated by configure.exe" << endl
<< "BUILD_PATH = " << QDir::toNativeSeparators(buildPath) << endl << "BUILD_PATH = " << QDir::toNativeSeparators(buildPath) << endl
<< "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl; << "SOURCE_PATH = " << QDir::toNativeSeparators(sourcePath) << endl
<< "INC_PATH = " << QDir::toNativeSeparators(
(QFile::exists(sourcePath + "/.git") ? buildPath : sourcePath)
+ "/include") << endl;
stream << "QT_VERSION = " << dictionary["VERSION"] << endl; stream << "QT_VERSION = " << dictionary["VERSION"] << endl;
if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) {
stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl stream << "QMAKESPEC = $(SOURCE_PATH)\\mkspecs\\win32-g++" << endl