Rename the syncqt -qtdir to -mkspecsdir
It's actually looking for the mkspecs (so it can read qconfig.pri to get the Qt version), so give it exactly what it wants. Change-Id: I2957b2d93a8837b8492d313209d45ff3ec01704c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
4d693b6cdf
commit
c67a5df8d8
26
bin/syncqt
26
bin/syncqt
@ -83,8 +83,8 @@ our $quoted_basedir;
|
||||
# Make sure we use Windows line endings for chomp and friends on Windows.
|
||||
$INPUT_RECORD_SEPARATOR = "\r\n" if ($^O eq "msys");
|
||||
|
||||
my $qtbasedir = dirname(dirname($0));
|
||||
normalizePath(\$qtbasedir) if (defined $qtbasedir);
|
||||
my $mkspecsdir = dirname(dirname($0));
|
||||
normalizePath(\$mkspecsdir) if (defined $mkspecsdir);
|
||||
|
||||
# will be defined based on the modules sync.profile
|
||||
our (%modules, %moduleheaders, @allmoduleheadersprivate, %classnames, %modulepris, %explicitheaders, %deprecatedheaders);
|
||||
@ -128,7 +128,7 @@ sub showUsage
|
||||
print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
|
||||
print " -minimal Do not create CamelCase headers (default: " . ($minimal ? "yes" : "no") . ")\n";
|
||||
print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
|
||||
print " -qtdir <PATH> Set the path to QtBase (detected: " . (defined $qtbasedir ? $qtbasedir : "-none-") . ")\n";
|
||||
print " -mkspecsdir <PATH> Set the path to the mkspecs (detected: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . ")\n";
|
||||
print " -quiet Only report problems, not activity (same as -verbose 0)\n";
|
||||
print " -v, -verbose <level> Sets the verbosity level (max. 4) (default: $verbose_level)\n";
|
||||
print " The short form increases the level by +1\n";
|
||||
@ -669,8 +669,8 @@ while ( @ARGV ) {
|
||||
} elsif($arg eq "-private") {
|
||||
$var = "create_private_headers";
|
||||
$val = "yes";
|
||||
} elsif($arg eq "-qtdir") {
|
||||
$var = "qtdir";
|
||||
} elsif($arg eq "-mkspecsdir") {
|
||||
$var = "mkspecsdir";
|
||||
$val = shift @ARGV;
|
||||
} elsif($arg =~/^-/) {
|
||||
print "Unknown option: $arg\n\n" if(!$var);
|
||||
@ -746,12 +746,12 @@ while ( @ARGV ) {
|
||||
push @modules_to_sync, $module;
|
||||
$moduleheaders{$module} = $headerdir;
|
||||
$create_uic_class_map = 0;
|
||||
} elsif ($var eq "qtdir") {
|
||||
} elsif ($var eq "mkspecsdir") {
|
||||
if($val) {
|
||||
$qtbasedir = $val;
|
||||
normalizePath(\$qtbasedir);
|
||||
$mkspecsdir = $val;
|
||||
normalizePath(\$mkspecsdir);
|
||||
} else {
|
||||
die "The -qtdir option requires an argument";
|
||||
die "The -mkspecsdir option requires an argument";
|
||||
}
|
||||
} elsif ($var eq "output") {
|
||||
my $outdir = $val;
|
||||
@ -767,9 +767,9 @@ while ( @ARGV ) {
|
||||
}
|
||||
|
||||
die "Cannot automatically detect/use provided path to QtBase's build directory!\n" .
|
||||
"QTDIR detected/provided: " . (defined $qtbasedir ? $qtbasedir : "-none-") . "\n" .
|
||||
"Please use the -qtdir option to provide the correct path.\nsyncqt failed"
|
||||
if (!$qtbasedir || !-d "$qtbasedir/mkspecs");
|
||||
"QTDIR detected/provided: " . (defined $mkspecsdir ? $mkspecsdir : "-none-") . "\n" .
|
||||
"Please use the -mkspecsdir option to provide the correct path.\nsyncqt failed"
|
||||
if (!$mkspecsdir || !-d $mkspecsdir);
|
||||
|
||||
# if we have no $basedir we cannot be sure which sources you want, so die
|
||||
die "Could not find any sync.profile for your module!\nPass <module directory> to syncqt to sync your header files.\nsyncqt failed" if (!$basedir);
|
||||
@ -792,7 +792,7 @@ my %allmoduleheadersprivate = map { $_ => 1 } @allmoduleheadersprivate;
|
||||
|
||||
$isunix = checkUnix; #cache checkUnix
|
||||
|
||||
my $qt_version = fileContents($qtbasedir."/mkspecs/qconfig.pri");
|
||||
my $qt_version = fileContents($mkspecsdir."/qconfig.pri");
|
||||
if (length($qt_version)) {
|
||||
$qt_version =~ s,.*^QT_VERSION[ \t]*=[ \t]*(\S+).*,$1,sm;
|
||||
} else {
|
||||
|
2
configure
vendored
2
configure
vendored
@ -2200,7 +2200,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
|
||||
if [ -x "$relpath/bin/syncqt" ]; then
|
||||
mkdir -p "$outpath/bin"
|
||||
echo "#!/bin/sh" >"$outpath/bin/syncqt"
|
||||
echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
|
||||
echo "perl \"$relpath/bin/syncqt\" -mkspecsdir \"$outpath/mkspecs\" \"\$@\"" >>"$outpath/bin/syncqt"
|
||||
chmod 755 "$outpath/bin/syncqt"
|
||||
fi
|
||||
|
||||
|
@ -8,7 +8,7 @@ else: \
|
||||
qtPrepareTool(QMAKE_SYNCQT, syncqt)
|
||||
contains(QT_CONFIG, private_tests): \ # -developer-build
|
||||
QMAKE_SYNCQT += -check-includes
|
||||
QMAKE_SYNCQT += -module $$TARGET -qtdir $$[QT_HOST_DATA/get] -outdir $$mod_component_base $$MODULE_BASE_DIR
|
||||
QMAKE_SYNCQT += -module $$TARGET -mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$mod_component_base $$MODULE_BASE_DIR
|
||||
!silent: message($$QMAKE_SYNCQT)
|
||||
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
||||
}
|
||||
|
@ -140,6 +140,6 @@ exists($$QTDIR/.qmake.cache): \
|
||||
else: \
|
||||
mod_component_base = $$dirname(_QMAKE_CACHE_)
|
||||
QMAKE_SYNCQT += -minimal -module QtCore -module QtDBus -module QtXml \
|
||||
-qtdir $$[QT_HOST_DATA/get] -outdir $$mod_component_base $$dirname(_QMAKE_CONF_)
|
||||
-mkspecsdir $$[QT_HOST_DATA/get]/mkspecs -outdir $$mod_component_base $$dirname(_QMAKE_CONF_)
|
||||
!silent:message($$QMAKE_SYNCQT)
|
||||
system($$QMAKE_SYNCQT)|error("Failed to run: $$QMAKE_SYNCQT")
|
||||
|
@ -164,7 +164,7 @@ Configure::Configure(int& argc, char** argv)
|
||||
QTextStream stream(&syncqt_bat);
|
||||
stream << "@echo off" << endl
|
||||
<< "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat")
|
||||
<< " -qtdir \"" << QDir::toNativeSeparators(buildPath) << "\" %*" << endl;
|
||||
<< " -mkspecsdir \"" << QDir::toNativeSeparators(buildPath) << "/mkspecs\" %*" << endl;
|
||||
syncqt_bat.close();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user