From c67a5df8d83f7741c2b7a0491cdc0782cae44971 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 15 Oct 2012 13:30:49 -0700 Subject: 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 Reviewed-by: Oswald Buddenhagen --- bin/syncqt | 26 +++++++++++++------------- configure | 2 +- mkspecs/features/qt_module_headers.prf | 2 +- src/tools/bootstrap/bootstrap.pro | 2 +- tools/configure/configureapp.cpp | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index 3ca057ec6c..a10117bf2e 100755 --- a/bin/syncqt +++ b/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 Specify output directory for sync (default: $out_basedir)\n"; - print " -qtdir Set the path to QtBase (detected: " . (defined $qtbasedir ? $qtbasedir : "-none-") . ")\n"; + print " -mkspecsdir 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 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 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 { diff --git a/configure b/configure index c5804f3d16..78ae73c2d4 100755 --- a/configure +++ b/configure @@ -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 diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index ef2f72f36d..0340f234c5 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -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") } diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index ffc369fd18..19c0005bcc 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -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") diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 508cd37ba4..0d4d6d4ec9 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -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(); } } -- cgit v1.2.3