summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-02-13 15:24:56 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-02-13 15:24:56 (GMT)
commitdcb2678f39345b66c5303e74c156654a8d13fe83 (patch)
treed2c7f2c9de464b1908316b94c07cc8ece831ad00 /bin
parent03a55630cfccf7f6ed01d865c541e07afb25c96e (diff)
parent6944a72cd26a5e3611ebd305ec665bc4c0fcee12 (diff)
downloadQt-dcb2678f39345b66c5303e74c156654a8d13fe83.zip
Qt-dcb2678f39345b66c5303e74c156654a8d13fe83.tar.gz
Qt-dcb2678f39345b66c5303e74c156654a8d13fe83.tar.bz2
Merge remote branch 'origin/master' into qt-master-from-4.6
Conflicts: tests/auto/qlineedit/tst_qlineedit.cpp tests/benchmarks/benchmarks.pro
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt39
1 files changed, 25 insertions, 14 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 306479a..6fb21dd 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -62,6 +62,7 @@ my %moduleheaders = ( # restrict the module headers to those found in relative p
# global variables (modified by options)
my $module = 0;
my $showonly = 0;
+my $quiet = 0;
my $remove_stale = 1;
my $force_win = 0;
my $force_relative = 0;
@@ -92,6 +93,7 @@ sub showUsage
print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
+ print " -quiet Only report problems, not activity (default: " . ($quiet ? "yes" : "no") . ")\n";
print " -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
print " -help This help\n";
exit 0;
@@ -324,7 +326,7 @@ sub syncHeader {
unless(-e "$header") {
my $header_dir = dirname($header);
- mkpath $header_dir, 0777;
+ mkpath $header_dir, !$quiet;
#write it
my $iheader_out = fixPaths($iheader, $header_dir);
@@ -464,7 +466,7 @@ sub copyFile
if ( $knowdiff || ($filecontents ne $ifilecontents) ) {
if ( $copy > 0 ) {
my $file_dir = dirname($file);
- mkpath $file_dir, 0777 unless(-e "$file_dir");
+ mkpath $file_dir, !$quiet unless(-e "$file_dir");
open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)";
local $/;
binmode O;
@@ -473,7 +475,7 @@ sub copyFile
return 1;
} elsif ( $copy < 0 ) {
my $ifile_dir = dirname($ifile);
- mkpath $ifile_dir, 0777 unless(-e "$ifile_dir");
+ mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir");
open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)";
local $/;
binmode O;
@@ -499,7 +501,7 @@ sub symlinkFile
my ($file,$ifile) = @_;
if ($isunix) {
- print "symlink created for $file ";
+ print "symlink created for $file " unless $quiet;
if ( $force_relative && ($ifile =~ /^$basedir/)) {
my $t = getcwd();
my $c = -1;
@@ -507,9 +509,9 @@ sub symlinkFile
$t =~ s-^$basedir/--;
$p .= "../" while( ($c = index( $t, "/", $c + 1)) != -1 );
$file =~ s-^$basedir/-$p-;
- print " ($file)\n";
+ print " ($file)\n" unless $quiet;
}
- print "\n";
+ print "\n" unless $quiet;
return symlink($file, $ifile);
}
return copyFile($file, $ifile);
@@ -593,6 +595,9 @@ while ( @ARGV ) {
} elsif("$arg" eq "-show") {
$var = "showonly";
$val = "yes";
+ } elsif("$arg" eq "-quiet") {
+ $var = "quiet";
+ $val = "yes";
} elsif("$arg" eq "-base-dir") {
# skip, it's been dealt with at the top of the file
shift @ARGV;
@@ -615,6 +620,12 @@ while ( @ARGV ) {
} elsif($showonly) {
$showonly--;
}
+ } elsif ("$var" eq "quiet") {
+ if("$val" eq "yes") {
+ $quiet++;
+ } elsif($quiet) {
+ $quiet--;
+ }
} elsif ("$var" eq "check-includes") {
if("$val" eq "yes") {
$check_includes++;
@@ -640,7 +651,7 @@ while ( @ARGV ) {
$force_relative--;
}
} elsif ("$var" eq "module") {
- print "module :$val:\n";
+ print "module :$val:\n" unless $quiet;
die "No such module: $val" unless(defined $modules{$val});
push @modules_to_sync, $val;
} elsif ("$var" eq "separate-module") {
@@ -668,7 +679,7 @@ while ( @ARGV ) {
$isunix = checkUnix; #cache checkUnix
# create path
-mkpath "$out_basedir/include", 0777;
+mkpath "$out_basedir/include", !$quiet;
my @ignore_headers = ();
my $class_lib_map_contents = "";
@@ -871,7 +882,7 @@ foreach (@modules_to_sync) {
$pri_install_pfiles.= "$pri_install_iheader ";;
}
}
- print "header created for $iheader ($header_copies)\n" if($header_copies > 0);
+ print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet);
}
}
}
@@ -898,8 +909,8 @@ foreach (@modules_to_sync) {
}
if($master_include && $master_contents) {
my $master_dir = dirname($master_include);
- mkpath $master_dir, 0777;
- print "header (master) created for $lib\n";
+ mkpath $master_dir, !$quiet;
+ print "header (master) created for $lib\n" unless $quiet;
open MASTERINCLUDE, ">$master_include";
print MASTERINCLUDE "$master_contents";
close MASTERINCLUDE;
@@ -923,8 +934,8 @@ foreach (@modules_to_sync) {
}
if($headers_pri_file && $master_contents) {
my $headers_pri_dir = dirname($headers_pri_file);
- mkpath $headers_pri_dir, 0777;
- print "headers.pri file created for $lib\n";
+ mkpath $headers_pri_dir, !$quiet;
+ print "headers.pri file created for $lib\n" unless $quiet;
open HEADERS_PRI_FILE, ">$headers_pri_file";
print HEADERS_PRI_FILE "$headers_pri_contents";
close HEADERS_PRI_FILE;
@@ -944,7 +955,7 @@ unless($showonly || !$create_uic_class_map) {
}
if($class_lib_map) {
my $class_lib_map_dir = dirname($class_lib_map);
- mkpath $class_lib_map_dir, 0777;
+ mkpath $class_lib_map_dir, !$quiet;
open CLASS_LIB_MAP, ">$class_lib_map";
print CLASS_LIB_MAP "$class_lib_map_contents";
close CLASS_LIB_MAP;